From 9057ea1506172bd9840da803bd46e7bf74c9ebe1 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 11 Oct 2022 12:20:04 -0700 Subject: [PATCH 1/7] Restructures endpoint data, modules written for responses --- .../openapitools/codegen/CodegenResponse.java | 5 +- .../openapitools/codegen/DefaultCodegen.java | 23 +- .../languages/PythonClientCodegen.java | 116 +- .../resources/python/api_client.handlebars | 14 +- .../main/resources/python/api_test.handlebars | 11 +- .../main/resources/python/endpoint.handlebars | 222 +-- .../resources/python/endpoint_args.handlebars | 24 +- .../endpoint_body_serialization.handlebars | 2 +- .../python/endpoint_parameter.handlebars | 8 +- ...dpoint_parameter_schema_and_def.handlebars | 53 +- .../python/endpoint_response.handlebars | 91 ++ .../python/.openapi-generator/FILES | 4 + .../client/3_0_3_unit_test/python/README.md | 2 + .../docs/apis/tags/AdditionalPropertiesApi.md | 36 +- .../python/docs/apis/tags/AllOfApi.md | 81 +- .../python/docs/apis/tags/AnyOfApi.md | 45 +- .../docs/apis/tags/ContentTypeJsonApi.md | 1203 +++++++---------- .../python/docs/apis/tags/DefaultApi.md | 18 +- .../python/docs/apis/tags/EnumApi.md | 72 +- .../python/docs/apis/tags/FormatApi.md | 243 ++-- .../python/docs/apis/tags/ItemsApi.md | 9 +- .../python/docs/apis/tags/MaxItemsApi.md | 9 +- .../python/docs/apis/tags/MaxLengthApi.md | 9 +- .../python/docs/apis/tags/MaxPropertiesApi.md | 18 +- .../python/docs/apis/tags/MaximumApi.md | 18 +- .../python/docs/apis/tags/MinItemsApi.md | 9 +- .../python/docs/apis/tags/MinLengthApi.md | 9 +- .../python/docs/apis/tags/MinPropertiesApi.md | 9 +- .../python/docs/apis/tags/MinimumApi.md | 18 +- .../python/docs/apis/tags/ModelNotApi.md | 127 +- .../python/docs/apis/tags/MultipleOfApi.md | 36 +- .../python/docs/apis/tags/OneOfApi.md | 54 +- .../docs/apis/tags/OperationRequestBodyApi.md | 577 ++++---- .../python/docs/apis/tags/PathPostApi.md | 1203 +++++++---------- .../python/docs/apis/tags/PatternApi.md | 18 +- .../python/docs/apis/tags/PropertiesApi.md | 18 +- .../python/docs/apis/tags/RefApi.md | 104 +- .../python/docs/apis/tags/RequiredApi.md | 54 +- .../ResponseContentContentTypeSchemaApi.md | 626 ++++----- .../python/docs/apis/tags/TypeApi.md | 171 ++- .../python/docs/apis/tags/UniqueItemsApi.md | 18 +- .../docs/models/ObjectTypeMatchesObjects.md | 9 + .../test_object_type_matches_objects.py | 82 ++ .../test_post.py | 6 +- .../test_post.py | 2 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 16 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 10 +- .../test_post.py | 2 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 2 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 6 +- .../test_post.py | 4 +- .../test_post.py | 14 +- .../test_post.py | 20 +- .../test_post.py | 6 +- .../test_post.py | 6 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 6 +- .../test_post.py | 6 +- .../test_post.py | 6 +- .../test_post.py | 6 +- .../test_post.py | 6 +- .../test_post.py | 12 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 18 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 10 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 14 +- .../test_post.py | 8 +- .../test_post.py | 10 +- .../test_post.py | 12 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 6 +- .../test_post.py | 4 +- .../test_post.py | 6 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 20 +- .../test_post.py | 18 +- .../test_post.py | 12 +- .../test_post.py | 14 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 6 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 2 +- .../test_post.py | 16 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 2 +- .../test_post.py | 10 +- .../test_post.py | 2 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 18 +- .../test_post.py | 6 +- .../test_post.py | 30 +- .../test_post.py | 50 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 13 +- .../test_post.py | 13 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 9 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 25 +- .../test_post.py | 25 +- .../test_post.py | 9 +- .../test_post.py | 9 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 25 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 25 +- .../test_post.py | 25 +- .../test_post.py | 25 +- .../test_post.py | 13 +- .../test_post.py | 13 +- .../test_post.py | 13 +- .../test_post.py | 17 +- .../test_post.py | 5 +- .../test_post.py | 21 +- .../test_post.py | 13 +- .../test_post.py | 21 +- .../test_post.py | 13 +- .../test_post.py | 13 +- .../test_post.py | 21 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 13 +- .../test_post.py | 17 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 9 +- .../test_post.py | 5 +- .../test_post.py | 29 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 17 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 5 +- .../test_post.py | 13 +- .../test_post.py | 9 +- .../test_post.py | 61 +- .../test_post.py | 61 +- .../test_post.py | 25 +- .../test_post.py | 25 +- .../test_post.py | 25 +- .../python/unit_test_api/api_client.py | 14 +- .../model/object_type_matches_objects.py | 24 + .../model/object_type_matches_objects.pyi | 24 + .../python/unit_test_api/models/__init__.py | 1 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../post.py | 319 ----- .../post.pyi | 314 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../post.py | 367 ----- .../post.pyi | 362 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../post.py | 323 ----- .../post.pyi | 318 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../post.py | 326 ----- .../post.pyi | 321 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 84 +- .../{post.py => post/__init__.pyi} | 86 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../{post.py => post/__init__.py} | 85 +- .../{post.pyi => post/__init__.pyi} | 81 +- .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../post.py | 318 ----- .../post.pyi | 313 ----- .../post/__init__.py | 291 ++++ .../post/__init__.pyi | 286 ++++ .../post/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 34 +- .../{post.py => post/__init__.pyi} | 36 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 57 +- .../post/__init__.pyi | 210 +++ .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 34 +- .../{post.py => post/__init__.pyi} | 36 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../post/__init__.py | 215 +++ .../post/__init__.pyi | 210 +++ .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../post/__init__.pyi | 210 +++ .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 34 +- .../{post.py => post/__init__.pyi} | 36 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 34 +- .../{post.py => post/__init__.pyi} | 36 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 34 +- .../{post.py => post/__init__.pyi} | 36 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../post/__init__.py | 215 +++ .../post/__init__.pyi | 210 +++ .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../post.pyi | 257 ---- .../post/__init__.py | 215 +++ .../post/__init__.pyi | 210 +++ .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 34 +- .../{post.py => post/__init__.pyi} | 36 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 36 +- .../{post.py => post/__init__.pyi} | 38 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 56 +- .../{post.py => post/__init__.pyi} | 58 +- .../post/response_for_200.py | 43 + .../python/docs/apis/tags/DefaultApi.md | 4 +- .../python/this_package/api_client.py | 14 +- .../operators/{post.pyi => post/__init__.py} | 82 +- .../operators/{post.py => post/__init__.pyi} | 84 +- .../paths/operators/post/response_for_200.py | 28 + .../python/docs/apis/tags/AnotherFakeApi.md | 8 +- .../python/docs/apis/tags/DefaultApi.md | 5 +- .../petstore/python/docs/apis/tags/FakeApi.md | 223 ++- .../docs/apis/tags/FakeClassnameTags123Api.md | 8 +- .../petstore/python/docs/apis/tags/PetApi.md | 55 +- .../python/docs/apis/tags/StoreApi.md | 21 +- .../petstore/python/docs/apis/tags/UserApi.md | 29 +- .../client/petstore/python/docs/models/Foo.md | 2 +- .../docs/models/ObjectModelWithRefProps.md | 4 +- .../models/ObjectWithDecimalProperties.md | 2 +- .../python/petstore_api/api_client.py | 14 +- .../petstore/python/petstore_api/model/foo.py | 13 +- .../python/petstore_api/model/foo.pyi | 13 +- .../model/object_model_with_ref_props.py | 24 +- .../model/object_model_with_ref_props.pyi | 24 +- .../model/object_with_decimal_properties.py | 12 +- .../model/object_with_decimal_properties.pyi | 12 +- .../{patch.pyi => patch/__init__.py} | 91 +- .../{patch.py => patch/__init__.pyi} | 93 +- .../patch/response_for_200.py | 43 + .../fake/{delete.pyi => delete/__init__.py} | 281 ++-- .../fake/{delete.py => delete/__init__.pyi} | 282 ++-- .../paths/fake/delete/response_for_200.py | 28 + .../python/petstore_api/paths/fake/get.py | 752 ----------- .../python/petstore_api/paths/fake/get.pyi | 685 ---------- .../petstore_api/paths/fake/get/__init__.py | 738 ++++++++++ .../petstore_api/paths/fake/get/__init__.pyi | 671 +++++++++ .../paths/fake/get/response_for_200.py | 28 + .../paths/fake/get/response_for_404.py | 28 + .../fake/{patch.pyi => patch/__init__.py} | 91 +- .../fake/{patch.py => patch/__init__.pyi} | 93 +- .../paths/fake/patch/response_for_200.py | 43 + .../python/petstore_api/paths/fake/post.py | 579 -------- .../python/petstore_api/paths/fake/post.pyi | 530 -------- .../petstore_api/paths/fake/post/__init__.py | 562 ++++++++ .../petstore_api/paths/fake/post/__init__.pyi | 512 +++++++ .../paths/fake/post/response_for_200.py | 28 + .../paths/fake/post/response_for_404.py | 28 + .../{get.pyi => get/__init__.py} | 89 +- .../{get.py => get/__init__.pyi} | 91 +- .../get/response_for_200.py | 43 + .../{put.pyi => put/__init__.py} | 84 +- .../{put.py => put/__init__.pyi} | 86 +- .../put/response_for_200.py | 28 + .../{put.pyi => put/__init__.py} | 190 +-- .../{put.py => put/__init__.pyi} | 190 ++- .../put/response_for_200.py | 28 + .../{put.pyi => put/__init__.py} | 159 ++- .../{put.py => put/__init__.pyi} | 161 +-- .../put/response_for_200.py | 28 + .../{patch.pyi => patch/__init__.py} | 93 +- .../{patch.py => patch/__init__.pyi} | 98 +- .../patch/response_for_200.py | 43 + .../{delete.py => delete/__init__.py} | 129 +- .../{delete.pyi => delete/__init__.pyi} | 123 +- .../delete/response_for_200.py | 28 + .../delete/response_for_default.py | 28 + .../fake_health/{get.pyi => get/__init__.py} | 36 +- .../fake_health/{get.py => get/__init__.pyi} | 38 +- .../paths/fake_health/get/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 150 +- .../{post.py => post/__init__.pyi} | 150 +- .../post/response_for_200.py | 28 + .../paths/fake_inline_composition_/post.py | 851 ------------ .../paths/fake_inline_composition_/post.pyi | 828 ------------ .../fake_inline_composition_/post/__init__.py | 700 ++++++++++ .../post/__init__.pyi | 683 ++++++++++ .../post/response_for_200.py | 183 +++ .../{get.pyi => get/__init__.py} | 216 ++- .../{get.py => get/__init__.pyi} | 216 ++- .../get/response_for_200.py | 28 + .../{patch.pyi => patch/__init__.py} | 82 +- .../{patch.py => patch/__init__.pyi} | 84 +- .../fake_json_patch/patch/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../post/response_for_200.py | 41 + .../paths/fake_obj_in_query/get/__init__.py} | 179 +-- .../paths/fake_obj_in_query/get/__init__.pyi} | 181 ++- .../fake_obj_in_query/get/response_for_200.py | 28 + .../post.py | 661 --------- .../post.pyi | 656 --------- .../post/__init__.py | 654 +++++++++ .../post/__init__.pyi | 649 +++++++++ .../post/response_for_200.py | 41 + .../{post.pyi => post/__init__.py} | 311 +++-- .../{post.py => post/__init__.pyi} | 310 ++--- .../post/response_for_200.py | 43 + .../{get.pyi => get/__init__.py} | 112 +- .../{get.py => get/__init__.pyi} | 114 +- .../get/response_for_200.py | 41 + .../{get.py => get/__init__.py} | 120 +- .../{get.pyi => get/__init__.pyi} | 98 +- .../get/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../fake_refs_enum/post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 91 +- .../{post.py => post/__init__.pyi} | 93 +- .../fake_refs_mammal/post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../fake_refs_number/post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 89 +- .../{post.py => post/__init__.pyi} | 91 +- .../fake_refs_string/post/response_for_200.py | 43 + .../{get.pyi => get/__init__.py} | 34 +- .../{get.py => get/__init__.pyi} | 36 +- .../get/response_for_200.py | 42 + .../fake_test_query_paramters/put/__init__.py | 404 ++++++ .../put/__init__.pyi | 399 ++++++ .../put/response_for_200.py | 28 + .../{post.pyi => post/__init__.py} | 91 +- .../{post.py => post/__init__.pyi} | 93 +- .../post/response_for_200.py | 41 + .../{post.pyi => post/__init__.py} | 221 ++- .../{post.py => post/__init__.pyi} | 221 ++- .../fake_upload_file/post/response_for_200.py | 43 + .../{post.pyi => post/__init__.py} | 223 ++- .../{post.py => post/__init__.pyi} | 223 ++- .../post/response_for_200.py | 43 + .../petstore_api/paths/foo/get/__init__.py | 219 +++ .../petstore_api/paths/foo/get/__init__.pyi | 214 +++ .../paths/foo/get/response_for_default.py | 95 ++ .../paths/pet/{post.py => post/__init__.py} | 123 +- .../paths/pet/{post.pyi => post/__init__.pyi} | 113 +- .../paths/pet/post/response_for_200.py | 28 + .../paths/pet/post/response_for_405.py | 28 + .../paths/pet/{put.pyi => put/__init__.py} | 127 +- .../paths/pet/{put.py => put/__init__.pyi} | 131 +- .../paths/pet/put/response_for_400.py | 28 + .../paths/pet/put/response_for_404.py | 28 + .../paths/pet/put/response_for_405.py | 28 + .../paths/pet_find_by_status/get/__init__.py | 330 +++++ .../paths/pet_find_by_status/get/__init__.pyi | 311 +++++ .../get/response_for_200.py | 98 ++ .../get/response_for_400.py | 28 + .../paths/pet_find_by_tags/get/__init__.py | 305 +++++ .../paths/pet_find_by_tags/get/__init__.pyi | 294 ++++ .../pet_find_by_tags/get/response_for_200.py | 98 ++ .../pet_find_by_tags/get/response_for_400.py | 28 + .../{delete.pyi => delete/__init__.py} | 197 +-- .../{delete.py => delete/__init__.pyi} | 196 ++- .../pet_pet_id/delete/response_for_400.py | 28 + .../pet_pet_id/{get.pyi => get/__init__.py} | 146 +- .../pet_pet_id/{get.py => get/__init__.pyi} | 147 +- .../paths/pet_pet_id/get/response_for_200.py | 48 + .../paths/pet_pet_id/get/response_for_400.py | 28 + .../paths/pet_pet_id/get/response_for_404.py | 28 + .../pet_pet_id/{post.pyi => post/__init__.py} | 270 ++-- .../pet_pet_id/{post.py => post/__init__.pyi} | 269 ++-- .../paths/pet_pet_id/post/response_for_405.py | 28 + .../{post.pyi => post/__init__.py} | 295 ++-- .../{post.py => post/__init__.pyi} | 294 ++-- .../post/response_for_200.py | 43 + .../paths/store_inventory/get/__init__.py | 221 +++ .../paths/store_inventory/get/__init__.pyi | 212 +++ .../store_inventory/get/response_for_200.py | 69 + .../{post.pyi => post/__init__.py} | 109 +- .../{post.py => post/__init__.pyi} | 111 +- .../store_order/post/response_for_200.py | 48 + .../store_order/post/response_for_400.py | 28 + .../{delete.pyi => delete/__init__.py} | 103 +- .../{delete.py => delete/__init__.pyi} | 105 +- .../delete/response_for_400.py | 28 + .../delete/response_for_404.py | 28 + .../{get.pyi => get/__init__.py} | 167 +-- .../{get.py => get/__init__.pyi} | 171 +-- .../get/response_for_200.py | 48 + .../get/response_for_400.py | 28 + .../get/response_for_404.py | 28 + .../paths/user/{post.py => post/__init__.py} | 85 +- .../user/{post.pyi => post/__init__.pyi} | 81 +- .../paths/user/post/response_for_default.py | 28 + .../{post.pyi => post/__init__.py} | 132 +- .../{post.py => post/__init__.pyi} | 134 +- .../post/response_for_default.py | 28 + .../{post.pyi => post/__init__.py} | 132 +- .../{post.py => post/__init__.pyi} | 134 +- .../post/response_for_default.py | 28 + .../user_login/{get.pyi => get/__init__.py} | 176 +-- .../user_login/{get.py => get/__init__.pyi} | 190 +-- .../paths/user_login/get/response_for_200.py | 85 ++ .../paths/user_login/get/response_for_400.py | 28 + .../user_logout/{get.pyi => get/__init__.py} | 27 +- .../user_logout/{get.py => get/__init__.pyi} | 29 +- .../user_logout/get/response_for_default.py | 28 + .../{delete.pyi => delete/__init__.py} | 115 +- .../{delete.py => delete/__init__.pyi} | 117 +- .../user_username/delete/response_for_200.py | 28 + .../user_username/delete/response_for_404.py | 28 + .../{get.pyi => get/__init__.py} | 142 +- .../{get.py => get/__init__.pyi} | 144 +- .../user_username/get/response_for_200.py | 48 + .../user_username/get/response_for_400.py | 28 + .../user_username/get/response_for_404.py | 28 + .../{put.pyi => put/__init__.py} | 160 ++- .../{put.py => put/__init__.pyi} | 162 +-- .../user_username/put/response_for_400.py | 28 + .../user_username/put/response_for_404.py | 28 + .../test_another_fake_dummy/test_patch.py | 1 + .../test/test_paths/test_fake/test_patch.py | 1 + .../test_get.py | 1 + .../test_fake_classname_test/test_patch.py | 1 + .../test_paths/test_fake_health/test_get.py | 1 + .../test_post.py | 2 + .../test_fake_json_with_charset/test_post.py | 1 + .../test_post.py | 1 + .../test_post.py | 1 + .../test_get.py | 1 + .../test_post.py | 1 + .../test_fake_refs_arraymodel/test_post.py | 1 + .../test_fake_refs_boolean/test_post.py | 1 + .../test_post.py | 1 + .../test_fake_refs_enum/test_post.py | 1 + .../test_fake_refs_mammal/test_post.py | 1 + .../test_fake_refs_number/test_post.py | 1 + .../test_post.py | 1 + .../test_fake_refs_string/test_post.py | 1 + .../test_post.py | 1 + .../test_fake_upload_file/test_post.py | 1 + .../test_fake_upload_files/test_post.py | 1 + .../test/test_paths/test_foo/test_get.py | 1 + .../test_pet_find_by_status/test_get.py | 2 + .../test_pet_find_by_tags/test_get.py | 2 + .../test_paths/test_pet_pet_id/test_get.py | 2 + .../test_pet_pet_id_upload_image/test_post.py | 1 + .../test_store_inventory/test_get.py | 1 + .../test_paths/test_store_order/test_post.py | 2 + .../test_store_order_order_id/test_get.py | 2 + .../test_paths/test_user_login/test_get.py | 2 + .../test_paths/test_user_username/test_get.py | 2 + .../tests_manual/test_deserialization.py | 12 +- .../test_object_model_with_ref_props.py | 4 +- 1024 files changed, 43163 insertions(+), 37133 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response.handlebars create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectTypeMatchesObjects.md create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_type_matches_objects.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.pyi rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/{post.pyi => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/{post.py => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/{post.pyi => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/{post.pyi => post/__init__.pyi} (81%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/{post.py => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/{post.pyi => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/{post.pyi => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/{post.pyi => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/{post.py => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/{post.pyi => post/__init__.pyi} (81%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/{post.py => post/__init__.pyi} (78%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (82%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.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 create 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/__init__.py create 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/__init__.pyi create 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/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/{post.pyi => post/__init__.pyi} (81%) create 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/response_for_200.py rename 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 => post/__init__.py} (80%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/{post.pyi => post/__init__.py} (77%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/{post.py => post/__init__.pyi} (77%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/{post.pyi => post/__init__.py} (77%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/{post.py => post/__init__.pyi} (77%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/{post.pyi => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/{post.pyi => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/{post.py => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/{post.pyi => post/__init__.pyi} (81%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/{post.py => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/{post.pyi => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/{post.py => post/__init__.pyi} (80%) create 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/response_for_200.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 create 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/__init__.py create 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/__init__.pyi create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/{post.pyi => post/__init__.pyi} (80%) create 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/response_for_200.py rename 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 => post/__init__.py} (81%) rename 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 => post/__init__.pyi} (80%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/{post.py => post/__init__.py} (81%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/{post.pyi => post/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/response_for_200.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 create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.py create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.pyi create mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/{post.pyi => post/__init__.py} (91%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/{post.py => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/{post.pyi => post/__init__.py} (91%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/{post.py => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) create 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/__init__.pyi create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (82%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (82%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (82%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (82%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (83%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py create 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/__init__.py create 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/__init__.pyi create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/{post.pyi => post/__init__.py} (83%) create 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/__init__.pyi create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/{post.pyi => post/__init__.py} (91%) rename samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/{post.py => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py create 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/__init__.py create 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/__init__.pyi create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.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 create 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/__init__.py create 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/__init__.pyi create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (91%) rename 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 => post/__init__.pyi} (90%) create 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/response_for_200.py rename 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 => post/__init__.py} (89%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (90%) rename 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 => post/__init__.pyi} (89%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (82%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (83%) create 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/response_for_200.py rename 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 => post/__init__.py} (83%) rename 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 => post/__init__.pyi} (83%) create 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/response_for_200.py rename samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/{post.pyi => post/__init__.py} (76%) rename samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/{post.py => post/__init__.pyi} (76%) create mode 100644 samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/{patch.pyi => patch/__init__.py} (81%) rename samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/{patch.py => patch/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake/{delete.pyi => delete/__init__.py} (54%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake/{delete.py => delete/__init__.pyi} (54%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200.py 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 create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake/{patch.pyi => patch/__init__.py} (81%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake/{patch.py => patch/__init__.pyi} (81%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200.py 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 create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/{get.pyi => get/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/{get.py => get/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/{put.pyi => put/__init__.py} (80%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/{put.py => put/__init__.pyi} (79%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/{put.pyi => put/__init__.py} (68%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/{put.py => put/__init__.pyi} (68%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/{put.pyi => put/__init__.py} (68%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/{put.py => put/__init__.pyi} (69%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/{patch.pyi => patch/__init__.py} (81%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/{patch.py => patch/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/{delete.py => delete/__init__.py} (71%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/{delete.pyi => delete/__init__.pyi} (71%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/{get.pyi => get/__init__.py} (90%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/{get.py => get/__init__.pyi} (89%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/{post.pyi => post/__init__.py} (70%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/{post.py => post/__init__.pyi} (70%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200.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 create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/{get.pyi => get/__init__.py} (56%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/{get.py => get/__init__.pyi} (57%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/{patch.pyi => patch/__init__.py} (75%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/{patch.py => patch/__init__.pyi} (74%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/{post.pyi => post/__init__.py} (64%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/{post.py => post/__init__.pyi} (63%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200.py rename 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 => petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py} (60%) rename 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 => petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi} (60%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200.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 create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/{post.pyi => post/__init__.py} (55%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/{post.py => post/__init__.pyi} (56%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/{get.pyi => get/__init__.py} (75%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/{get.py => get/__init__.pyi} (74%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/{get.py => get/__init__.py} (74%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/{get.pyi => get/__init__.pyi} (75%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/{post.pyi => post/__init__.py} (77%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/{post.py => post/__init__.pyi} (76%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/{post.pyi => post/__init__.py} (81%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/{post.py => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/{post.pyi => post/__init__.py} (77%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/{post.py => post/__init__.pyi} (76%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/{get.pyi => get/__init__.py} (92%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/{get.py => get/__init__.pyi} (91%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/{post.pyi => post/__init__.py} (76%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/{post.py => post/__init__.pyi} (76%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/{post.pyi => post/__init__.py} (61%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/{post.py => post/__init__.pyi} (61%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/{post.pyi => post/__init__.py} (61%) rename samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/{post.py => post/__init__.pyi} (61%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py rename samples/openapi3/client/petstore/python/petstore_api/paths/pet/{post.py => post/__init__.py} (76%) rename samples/openapi3/client/petstore/python/petstore_api/paths/pet/{post.pyi => post/__init__.pyi} (76%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405.py rename samples/openapi3/client/petstore/python/petstore_api/paths/pet/{put.pyi => put/__init__.py} (77%) rename samples/openapi3/client/petstore/python/petstore_api/paths/pet/{put.py => put/__init__.pyi} (74%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400.py rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/{delete.pyi => delete/__init__.py} (63%) rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/{delete.py => delete/__init__.pyi} (64%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400.py rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/{get.pyi => get/__init__.py} (71%) rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/{get.py => get/__init__.pyi} (69%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/{post.pyi => post/__init__.py} (53%) rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/{post.py => post/__init__.pyi} (53%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405.py rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/{post.pyi => post/__init__.py} (55%) rename samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/{post.py => post/__init__.pyi} (56%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/store_order/{post.pyi => post/__init__.py} (78%) rename samples/openapi3/client/petstore/python/petstore_api/paths/store_order/{post.py => post/__init__.pyi} (77%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400.py rename samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/{delete.pyi => delete/__init__.py} (74%) rename samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/{delete.py => delete/__init__.pyi} (73%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/{get.pyi => get/__init__.py} (70%) rename samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/{get.py => get/__init__.pyi} (68%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user/{post.py => post/__init__.py} (80%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user/{post.pyi => post/__init__.pyi} (80%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/{post.pyi => post/__init__.py} (74%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/{post.py => post/__init__.pyi} (74%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/{post.pyi => post/__init__.py} (74%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/{post.py => post/__init__.pyi} (74%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_login/{get.pyi => get/__init__.py} (68%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_login/{get.py => get/__init__.pyi} (65%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/{get.pyi => get/__init__.py} (92%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/{get.py => get/__init__.pyi} (91%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_username/{delete.pyi => delete/__init__.py} (72%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_username/{delete.py => delete/__init__.pyi} (71%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_username/{get.pyi => get/__init__.py} (71%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_username/{get.py => get/__init__.pyi} (69%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_username/{put.pyi => put/__init__.py} (69%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_username/{put.py => put/__init__.pyi} (69%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404.py diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index aa6b103b77c..c0121ac9c10 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -93,6 +93,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { private Map requiredVarsMap; private String ref; private boolean schemaIsFromAdditionalProperties; + public Set imports = new TreeSet<>(); @Override public int hashCode() { @@ -105,7 +106,7 @@ public int hashCode() { getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(), is1xx, is2xx, is3xx, is4xx, is5xx, additionalPropertiesIsAnyType, hasVars, hasRequired, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders, content, - requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties); + requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties, imports); } @Override @@ -155,6 +156,7 @@ public boolean equals(Object o) { getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() && getHasVars() == that.getHasVars() && getHasRequired() == that.getHasRequired() && + Objects.equals(imports, that.imports) && Objects.equals(uniqueItemsBoolean, that.getUniqueItemsBoolean()) && Objects.equals(ref, that.getRef()) && Objects.equals(requiredVarsMap, that.getRequiredVarsMap()) && @@ -612,6 +614,7 @@ public String toString() { sb.append(", requiredVarsMap=").append(requiredVarsMap); sb.append(", ref=").append(ref); sb.append(", schemaIsFromAdditionalProperties=").append(schemaIsFromAdditionalProperties); + sb.append(", imports=").append(imports); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 21bcb2241af..3be79f57e4c 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4265,13 +4265,12 @@ public CodegenOperation fromOperation(String path, for (Entry entry : headers.entrySet()) { String headerName = entry.getKey(); Header header = ModelUtils.getReferencedHeader(this.openAPI, entry.getValue()); - CodegenParameter responseHeader = headerToCodegenParameter(header, headerName, imports, String.format(Locale.ROOT, "%sResponseParameter", r.code)); + CodegenParameter responseHeader = headerToCodegenParameter(header, headerName, r.imports, String.format(Locale.ROOT, "%sResponseParameter", r.code)); responseHeaders.add(responseHeader); } r.setResponseHeaders(responseHeaders); } - String mediaTypeSchemaSuffix = String.format(Locale.ROOT, "%sResponseBody", r.code); - r.setContent(getContent(response.getContent(), imports, mediaTypeSchemaSuffix)); + r.setContent(getContent(response.getContent(), r.imports, "")); if (!addSchemaImportsFromV3SpecLocations) { if (r.baseType != null && @@ -4391,7 +4390,7 @@ public CodegenOperation fromOperation(String path, param = ModelUtils.getReferencedParameter(this.openAPI, param); CodegenParameter p = fromParameter(param, imports); - p.setContent(getContent(param.getContent(), imports, "RequestParameter" + toModelName(param.getName()))); + p.setContent(getContent(param.getContent(), imports, param.getName())); // ensure unique params if (ensureUniqueParams) { @@ -7092,10 +7091,6 @@ protected void updateRequestBodyForString(CodegenParameter codegenParameter, Sch codegenParameter.pattern = toRegularExpression(schema.getPattern()); } - protected String toMediaTypeSchemaName(String contentType, String mediaTypeSchemaSuffix) { - return "SchemaFor" + mediaTypeSchemaSuffix + toModelName(contentType); - } - private CodegenParameter headerToCodegenParameter(Header header, String headerName, Set imports, String mediaTypeSchemaSuffix) { if (header == null) { return null; @@ -7121,7 +7116,7 @@ private CodegenParameter headerToCodegenParameter(Header header, String headerNa return param; } - protected LinkedHashMap getContent(Content content, Set imports, String mediaTypeSchemaSuffix) { + protected LinkedHashMap getContent(Content content, Set imports, String schemaName) { if (content == null) { return null; } @@ -7140,7 +7135,7 @@ protected LinkedHashMap getContent(Content content, Se for (Entry headerEntry : encHeaders.entrySet()) { String headerName = headerEntry.getKey(); Header header = ModelUtils.getReferencedHeader(this.openAPI, headerEntry.getValue()); - CodegenParameter param = headerToCodegenParameter(header, headerName, imports, mediaTypeSchemaSuffix); + CodegenParameter param = headerToCodegenParameter(header, headerName, imports, schemaName); headers.add(param); } } @@ -7157,8 +7152,12 @@ protected LinkedHashMap getContent(Content content, Se } String contentType = contentEntry.getKey(); CodegenProperty schemaProp = null; + String usedSchemaName = schemaName; + if (usedSchemaName.equals("")) { + usedSchemaName = contentType; + } if (mt.getSchema() != null) { - schemaProp = fromProperty(toMediaTypeSchemaName(contentType, mediaTypeSchemaSuffix), mt.getSchema(), false); + schemaProp = fromProperty(usedSchemaName, mt.getSchema(), false); } HashMap schemaTestCases = null; if (mt.getExtensions() != null && mt.getExtensions().containsKey(xSchemaTestExamplesKey)) { @@ -7207,7 +7206,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S if (schema == null) { throw new RuntimeException("Request body cannot be null. Possible cause: missing schema in body parameter (OAS v2): " + body); } - codegenParameter.setContent(getContent(body.getContent(), imports, "RequestBody")); + codegenParameter.setContent(getContent(body.getContent(), imports, "")); if (StringUtils.isNotBlank(schema.get$ref())) { name = ModelUtils.getSimpleRef(schema.get$ref()); diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 1bbae6ebca9..4a85fb38e7b 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -552,7 +552,8 @@ protected void generateEndpoints(OperationsMap objs) { OperationMap operations = objs.getOperations(); List codegenOperations = operations.getOperation(); HashMap pathModuleToPath = new HashMap<>(); - // paths.some_path.post.py (single endpoint definition) + // paths.some_path.post.__init__.py (single endpoint definition) + // responses are adjacent to the init file for (CodegenOperation co: codegenOperations) { if (co.tags != null) { for (Tag tag: co.tags) { @@ -574,14 +575,29 @@ protected void generateEndpoints(OperationsMap objs) { endpointMap.put("operation", co); endpointMap.put("imports", co.imports); endpointMap.put("packageName", packageName); - outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod + ".py")); + outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, "__init__.py")); pathsFiles.add(Arrays.asList(endpointMap, "endpoint.handlebars", outputFilename)); + + for (CodegenResponse response: co.responses) { + // paths.some_path.post.response_for_200.py (file per response) + Map responseMap = new HashMap<>(); + responseMap.put("response", response); + responseMap.put("packageName", packageName); + String responseModuleName = "response_for_"; + if (response.isDefault) { + responseModuleName += "default"; + } else { + responseModuleName += response.code; + } + String responseFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName+ ".py")); + pathsFiles.add(Arrays.asList(responseMap, "endpoint_response.handlebars", responseFilename)); + } /* 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")); + String stubOutputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, "__init__.pyi")); pathsFiles.add(Arrays.asList(endpointMap, "endpoint_stub.handlebars", stubOutputFilename)); Map endpointTestMap = new HashMap<>(); @@ -749,72 +765,7 @@ public String getHelp() { @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()))); - } - } + // python allows schemas to be inlined at any location so unaliasing should do nothing return schema; } @@ -892,6 +843,17 @@ public String toModelImport(String name) { return "from " + packagePath() + "." + modelPackage() + "." + toModelFilename(name) + " import " + toModelName(name); } + private void fixSchemaImports(Set imports) { + if (imports.size() == 0) { + return; + } + String[] modelNames = imports.toArray(new String[0]); + imports.clear(); + for (String modelName : modelNames) { + imports.add(toModelImport(modelName)); + } + } + @Override @SuppressWarnings("static-method") public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { @@ -902,13 +864,9 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, 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)); + fixSchemaImports(operation.imports); + for (CodegenResponse response: operation.responses) { + fixSchemaImports(response.imports); } } generateEndpoints(objs); @@ -2650,13 +2608,17 @@ public List fromRequestBodyToFormParameters(RequestBody 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.setContent(getContent(body.getContent(), imports, "")); cp.isFormParam = false; cp.isBodyParam = true; parameters.add(cp); return parameters; } + protected boolean needToImport(String type) { + return true; + } + /** * Custom version of this method so we can move the body parameter into bodyParam * diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.handlebars index bdcd4519ff4..cfb0694b80b 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.handlebars @@ -1,7 +1,7 @@ # coding: utf-8 {{>partial_header}} -from dataclasses import dataclass +import dataclasses from decimal import Decimal import enum import email @@ -339,7 +339,7 @@ class JSONDetector: return False -@dataclass +@dataclasses.dataclass class ParameterBase(JSONDetector): name: str in_type: ParameterInType @@ -779,7 +779,7 @@ class Encoding: self.allow_reserved = allow_reserved -@dataclass +@dataclasses.dataclass class MediaType: """ Used to store request and response body schema information @@ -793,7 +793,7 @@ class MediaType: encoding: typing.Optional[typing.Dict[str, Encoding]] = None -@dataclass +@dataclasses.dataclass class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] @@ -802,8 +802,8 @@ class ApiResponse: def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]], - headers: typing.Union[Unset, typing.List[HeaderParameter]] + body: typing.Union[Unset, typing.Type[Schema]] = unset, + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -813,7 +813,7 @@ class ApiResponse: self.headers = headers -@dataclass +@dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse body: typing.Union[Unset, typing.Type[Schema]] = unset diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_test.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_test.handlebars index 142ec8b435a..86d85596910 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_test.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_test.handlebars @@ -36,6 +36,9 @@ class Test{{operationIdSnakeCase}}(ApiTestMixin, unittest.TestCase): response_status = {{code}} {{#if content}} {{#each content}} + {{#if schema}} + response_body_schema = {{httpMethod}}.response_for_{{#if ../isDefault}}default{{else}}{{code}}{{/if}}.BodySchemas.{{#if schema.nameInSnakeCase}}{{schema.name}}{{else}}{{schema.baseName}}{{/if}} + {{/if}} {{#if this.testCases}} {{#each testCases}} @@ -58,8 +61,8 @@ class Test{{operationIdSnakeCase}}(ApiTestMixin, unittest.TestCase): {{> api_test_partial }} assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, {{httpMethod}}.{{schema.baseName}}) - deserialized_response_body = {{httpMethod}}.{{schema.baseName}}.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -106,7 +109,7 @@ class Test{{operationIdSnakeCase}}(ApiTestMixin, unittest.TestCase): {{/with}} ) {{#if valid}} - body = {{httpMethod}}.{{schema.baseName}}.from_openapi_data_oapg( + body = {{httpMethod}}.RequestBody.Schemas.{{#if schema.nameInSnakeCase}}{{schema.name}}{{else}}{{schema.baseName}}{{/if}}.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -120,7 +123,7 @@ class Test{{operationIdSnakeCase}}(ApiTestMixin, unittest.TestCase): assert isinstance(api_response.body, schemas.Unset) {{else}} with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): - body = {{httpMethod}}.{{schema.baseName}}.from_openapi_data_oapg( + body = {{httpMethod}}.RequestBody.Schemas.{{#if schema.nameInSnakeCase}}{{schema.name}}{{else}}{{schema.baseName}}{{/if}}.from_openapi_data_oapg( payload, _configuration=self._configuration ) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars index 8190bd78e3d..601a5e4b533 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars @@ -16,46 +16,63 @@ from {{packageName}} import api_client, exceptions {{> model_templates/imports_schemas }} {{#unless isStub}} -from . import path - +from .. import path {{/unless}} {{#with operation}} -{{#if queryParams}} -{{> endpoint_parameter_schema_and_def xParams=queryParams xParamsName="Query" }} -{{/if}} -{{#if headerParams}} -{{> endpoint_parameter_schema_and_def xParams=headerParams xParamsName="Header" }} -{{/if}} -{{#if pathParams}} -{{> endpoint_parameter_schema_and_def xParams=pathParams xParamsName="Path" }} -{{/if}} -{{#if cookieParams}} -{{> endpoint_parameter_schema_and_def xParams=cookieParams xParamsName="Cookie" }} -{{/if}} -{{#with bodyParam}} -# body param -{{#each content}} -{{#with this.schema}} -{{> model_templates/schema }} -{{/with}} +{{#each responses}} +from . import response_for_{{#if isDefault}}default{{else}}{{code}}{{/if}} {{/each}} +{{#or queryParams headerParams pathParams cookieParams}} + {{#if queryParams}} +{{> endpoint_parameter_schema_and_def xParams=queryParams xParamsName="RequestQueryParameters" }} + {{/if}} + {{#if headerParams}} +{{> endpoint_parameter_schema_and_def xParams=headerParams xParamsName="RequestHeaderParameters" }} + {{/if}} + {{#if pathParams}} +{{> endpoint_parameter_schema_and_def xParams=pathParams xParamsName="RequestPathParameters" }} + {{/if}} + {{#if cookieParams}} +{{> endpoint_parameter_schema_and_def xParams=cookieParams xParamsName="RequestCookieParameters" }} + {{/if}} +{{/or}} +{{#if bodyParam}} +{{#with bodyParam}} -request_body_{{paramName}} = api_client.RequestBody( - content={ -{{#each content}} - '{{{@key}}}': api_client.MediaType({{#if this.schema}} - schema={{this.schema.baseName}}{{/if}}), -{{/each}} - }, -{{#if required}} - required=True, -{{/if}} -) + +class RequestBody: + class Schemas: + {{#each content}} + {{#with this}} + {{#with schema}} + {{> model_templates/schema }} + {{/with}} + {{/with}} + {{/each}} + + parameter = api_client.RequestBody( + content={ + {{#each content}} + '{{{@key}}}': api_client.MediaType( + {{#with this}} + {{#with schema}} + schema=Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}} + {{/with}} + {{/with}} + ), + {{/each}} + }, + {{#if required}} + required=True, + {{/if}} + ) {{/with}} +{{/if}} {{#unless isStub}} {{#each authMethods}} {{#if @first}} + _auth = [ {{/if}} '{{name}}', @@ -65,6 +82,7 @@ _auth = [ {{/each}} {{#each servers}} {{#if @first}} + _servers = ( {{/if}} { @@ -97,126 +115,14 @@ _servers = ( {{/if}} {{/each}} {{/unless}} -{{#each responses}} -{{#each responseHeaders}} -{{#with schema}} -{{> model_templates/schema }} -{{/with}} {{#unless isStub}} -{{paramName}}_parameter = api_client.HeaderParameter( - name="{{baseName}}", -{{#if style}} - style=api_client.ParameterStyle.{{style}}, -{{/if}} -{{#if schema}} -{{#with schema}} - schema={{baseName}}, -{{/with}} -{{/if}} -{{#if required}} - required=True, -{{/if}} -{{#if isExplode}} - explode=True, -{{/if}} -) -{{/unless}} -{{/each}} -{{#each content}} -{{#with this.schema}} -{{> model_templates/schema }} -{{/with}} -{{/each}} -{{#if responseHeaders}} -ResponseHeadersFor{{code}} = typing_extensions.TypedDict( - 'ResponseHeadersFor{{code}}', - { -{{#each responseHeaders}} - '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} -{{/each}} - } -) -{{/if}} - -@dataclass -{{#if isDefault}} -class ApiResponseForDefault(api_client.ApiResponse): -{{else}} -class ApiResponseFor{{code}}(api_client.ApiResponse): -{{/if}} - response: urllib3.HTTPResponse -{{#and responseHeaders content}} - body: typing.Union[ -{{#each content}} -{{#if this.schema}} - {{this.schema.baseName}}, -{{else}} - schemas.Unset, -{{/if}} -{{/each}} - ] - headers: ResponseHeadersFor{{code}} -{{else}} -{{#or responseHeaders content}} -{{#if responseHeaders}} - headers: ResponseHeadersFor{{code}} - body: schemas.Unset = schemas.unset -{{else}} - body: typing.Union[ -{{#each content}} -{{#if this.schema}} - {{this.schema.baseName}}, -{{else}} - schemas.Unset, -{{/if}} -{{/each}} - ] - headers: schemas.Unset = schemas.unset -{{/if}} -{{/or}} -{{/and}} -{{#unless responseHeaders}} -{{#unless content}} - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset -{{/unless}} -{{/unless}} - - -{{#if isDefault}} -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -{{else}} -_response_for_{{code}} = api_client.OpenApiResponse( - response_cls=ApiResponseFor{{code}}, -{{/if}} -{{#each content}} -{{#if @first}} - content={ -{{/if}} - '{{{@key}}}': api_client.MediaType({{#if this.schema}} - schema={{this.schema.baseName}}{{/if}}), -{{#if @last}} - }, -{{/if}} -{{/each}} -{{#if responseHeaders}} - headers=[ -{{#each responseHeaders}} - {{paramName}}_parameter, -{{/each}} - ] -{{/if}} -) -{{/each}} -{{#unless isStub}} _status_code_to_response = { {{#each responses}} {{#if isDefault}} - 'default': _response_for_default, + 'default': response_for_default.response, {{else}} - '{{code}}': _response_for_{{code}}, + '{{code}}': response_for_{{code}}.response, {{/if}} {{/each}} } @@ -265,26 +171,22 @@ class BaseApi(api_client.Api): class instances """ {{#if queryParams}} - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestQueryParameters.Params, query_params) {{/if}} {{#if headerParams}} - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) {{/if}} {{#if pathParams}} - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) {{/if}} {{#if cookieParams}} - self._verify_typed_dict_inputs_oapg(RequestCookieParams, cookie_params) + self._verify_typed_dict_inputs_oapg(RequestCookieParameters.Params, cookie_params) {{/if}} used_path = path.value {{#if pathParams}} _path_params = {} - for parameter in ( - {{#each pathParams}} - request_path_{{paramName}}, - {{/each}} - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -297,11 +199,7 @@ class BaseApi(api_client.Api): {{#if queryParams}} prefix_separator_iterator = None - for parameter in ( - {{#each queryParams}} - request_query_{{paramName}}, - {{/each}} - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -317,11 +215,7 @@ class BaseApi(api_client.Api): {{else}} {{/or}} {{#if headerParams}} - for parameter in ( - {{#each headerParams}} - request_header_{{paramName}}, - {{/each}} - ): + for parameter in RequestHeaderParameters.parameters: parameter_data = header_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars index 1eceaf34ad3..d2038c9bf49 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars @@ -3,9 +3,9 @@ {{#if bodyParam.required}} {{#with bodyParam}} {{#eq ../contentType "null"}} - body: typing.Union[{{#each getContent}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}], + body: typing.Union[{{#each getContent}}{{#with this.schema}}RequestBody.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}], {{else}} - body: typing.Union[{{#each getContent}}{{#eq @key ../../contentType }}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/eq}}{{/each}}], + body: typing.Union[{{#each getContent}}{{#eq @key ../../contentType }}{{#with this.schema}}RequestBody.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}},{{> model_templates/schema_python_types }}{{/with}}{{/eq}}{{/each}}], {{/eq}} {{/with}} {{#if isOverload}} @@ -67,9 +67,9 @@ {{/if}} {{#with bodyParam}} {{#eq ../contentType "null"}} - body: typing.Union[{{#each getContent}}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/each}}schemas.Unset] = schemas.unset, + body: typing.Union[{{#each getContent}}{{#with this.schema}}RequestBody.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}{{/with}}{{/each}}schemas.Unset] = schemas.unset, {{else}} - body: typing.Union[{{#each getContent}}{{#eq @key ../../contentType }}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/eq}}{{/each}}schemas.Unset] = schemas.unset, + body: typing.Union[{{#each getContent}}{{#eq @key ../../contentType }}{{#with this.schema}}RequestBody.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}{{/with}}{{/eq}}{{/each}}schemas.Unset] = schemas.unset, {{/eq}} {{/with}} {{/if}} @@ -81,16 +81,16 @@ {{/if}} {{/if}} {{#if queryParams}} - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), {{/if}} {{#if headerParams}} - header_params: RequestHeaderParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), {{/if}} {{#if pathParams}} - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), {{/if}} {{#if cookieParams}} - cookie_params: RequestCookieParams = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), {{/if}} {{#if produces}} accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -117,10 +117,10 @@ ) -> {{#if getAllResponsesAreErrors}}api_client.ApiResponseWithoutDeserialization: ...{{else}}typing.Union[ {{#each responses}} {{#if isDefault}} - ApiResponseForDefault, + response_for_default.ApiResponse, {{else}} {{#if is2xx}} - ApiResponseFor{{code}}, + response_for_{{code}}.ApiResponse, {{/if}} {{/if}} {{/each}} @@ -132,10 +132,10 @@ ) -> typing.Union[ {{#each responses}} {{#if isDefault}} - ApiResponseForDefault, + response_for_default.ApiResponse, {{else}} {{#if is2xx}} - ApiResponseFor{{code}}, + response_for_{{code}}.ApiResponse, {{/if}} {{/if}} {{/each}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_body_serialization.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_body_serialization.handlebars index f00d9f05d27..8d9b9d2fe0b 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_body_serialization.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_body_serialization.handlebars @@ -1,4 +1,4 @@ -serialized_data = request_body_{{paramName}}.serialize(body, content_type) +serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter.handlebars index 8c18c997e35..b17fabfc0f8 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter.handlebars @@ -1,17 +1,17 @@ -request_{{#if isQueryParam}}query{{/if}}{{#if isPathParam}}path{{/if}}{{#if isHeaderParam}}header{{/if}}{{#if isCookieParam}}cookie{{/if}}_{{paramName}} = api_client.{{#if isQueryParam}}Query{{/if}}{{#if isPathParam}}Path{{/if}}{{#if isHeaderParam}}Header{{/if}}{{#if isCookieParam}}Cookie{{/if}}Parameter( +api_client.{{#if isQueryParam}}Query{{/if}}{{#if isPathParam}}Path{{/if}}{{#if isHeaderParam}}Header{{/if}}{{#if isCookieParam}}Cookie{{/if}}Parameter( name="{{baseName}}", {{#if style}} style=api_client.ParameterStyle.{{style}}, {{/if}} {{#if schema}} {{#with schema}} - schema={{baseName}}, + schema=Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{/with}} {{/if}} {{#if getContent}} content={ {{#each getContent}} - "{{@key}}": {{#with this}}{{#with schema}}{{baseName}}{{/with}}{{/with}}, + "{{@key}}": {{#with this}}{{#with schema}}Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/with}}{{/with}}, {{/each}} }, {{/if}} @@ -21,4 +21,4 @@ request_{{#if isQueryParam}}query{{/if}}{{#if isPathParam}}path{{/if}}{{#if isHe {{#if isExplode}} explode=True, {{/if}} -) +), diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars index 313a64dc200..ab0b354e51f 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars @@ -1,56 +1,63 @@ -# {{xParamsName}} params + + +class {{xParamsName}}: + class Schemas: {{#each xParams}} {{#if schema}} {{#with schema}} -{{> model_templates/schema }} + {{> model_templates/schema }} {{/with}} {{else}} {{#if getContent}} {{#each getContent}} {{#with this}} {{#with schema}} -{{> model_templates/schema }} + {{> model_templates/schema }} {{/with}} {{/with}} {{/each}} {{/if}} {{/if}} {{/each}} -RequestRequired{{xParamsName}}Params = typing_extensions.TypedDict( - 'RequestRequired{{xParamsName}}Params', - { + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { {{#each xParams}} {{#if required}} {{#if schema}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} + '{{baseName}}': {{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}} {{else}} - '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} + '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} {{/if}} {{/if}} {{/each}} - } -) -RequestOptional{{xParamsName}}Params = typing_extensions.TypedDict( - 'RequestOptional{{xParamsName}}Params', - { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { {{#each xParams}} {{#unless required}} {{#if schema}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} + '{{baseName}}': {{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}} {{else}} - '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} + '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} {{/if}} {{/unless}} {{/each}} - }, - total=False -) + }, + total=False + ) -class Request{{xParamsName}}Params(RequestRequired{{xParamsName}}Params, RequestOptional{{xParamsName}}Params): - pass + class Params(RequiredParams, OptionalParams): + pass -{{#each xParams}} -{{> endpoint_parameter }} -{{/each}} \ No newline at end of file + parameters = [ + {{#each xParams}} + {{> endpoint_parameter }} + {{/each}} + ] \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response.handlebars new file mode 100644 index 00000000000..16521863824 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response.handlebars @@ -0,0 +1,91 @@ +import dataclasses +import urllib3 + +from {{packageName}} import api_client +{{> model_templates/imports_schema_types }} +{{#with response}} +{{> model_templates/imports_schemas }} +{{#if responseHeaders}} +{{> endpoint_parameter_schema_and_def xParams=responseHeaders xParamsName="Header" }} +{{/if}} +{{#if getContent}} + + +class BodySchemas: + # body schemas + {{#each content}} + {{#with this.schema}} + {{> model_templates/schema }} + {{/with}} + {{/each}} + pass +{{/if}} + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse +{{#and responseHeaders content}} + body: typing.Union[ +{{#each content}} +{{#if this.schema}} + {{#with this.schema}} + BodySchemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + {{/with}} +{{else}} + schemas.Unset, +{{/if}} +{{/each}} + ] + headers: Header.Params +{{else}} +{{#or responseHeaders content}} +{{#if responseHeaders}} + headers: Header.Params + body: schemas.Unset = schemas.unset +{{else}} + body: typing.Union[ +{{#each content}} +{{#if this.schema}} + {{#with this.schema}} + BodySchemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + {{/with}} +{{else}} + schemas.Unset, +{{/if}} +{{/each}} + ] + headers: schemas.Unset = schemas.unset +{{/if}} +{{/or}} +{{/and}} +{{#unless responseHeaders}} +{{#unless content}} + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset +{{/unless}} +{{/unless}} + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +{{#each content}} +{{#if @first}} + content={ +{{/if}} + '{{{@key}}}': api_client.MediaType( + {{#if this.schema}} + {{#with this.schema}} + schema=BodySchemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + {{/with}} + {{/if}} + ), +{{#if @last}} + }, +{{/if}} +{{/each}} +{{#if responseHeaders}} + headers=Header.parameters +{{/if}} +) +{{/with}} \ No newline at end of file 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 index 76fb1cb914d..ef95945f68f 100644 --- 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 @@ -88,6 +88,7 @@ docs/models/NulCharactersInStrings.md docs/models/NullTypeMatchesOnlyTheNullObject.md docs/models/NumberTypeMatchesNumbers.md docs/models/ObjectPropertiesValidation.md +docs/models/ObjectTypeMatchesObjects.md docs/models/Oneof.md docs/models/OneofComplexTypes.md docs/models/OneofWithBaseSchema.md @@ -181,6 +182,7 @@ 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_object_type_matches_objects.py test/test_models/test_oneof.py test/test_models/test_oneof_complex_types.py test/test_models/test_oneof_with_base_schema.py @@ -360,6 +362,8 @@ 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/object_type_matches_objects.py +unit_test_api/model/object_type_matches_objects.pyi unit_test_api/model/oneof.py unit_test_api/model/oneof.pyi unit_test_api/model/oneof_complex_types.py 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 index 3c71a079b1b..4f59780c066 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/README.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/README.md @@ -146,6 +146,7 @@ from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalprope 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 # Defining the host is optional and defaults to https://someserver.com/v1 @@ -930,6 +931,7 @@ Class | Method | HTTP request | Description - [NullTypeMatchesOnlyTheNullObject](docs/models/NullTypeMatchesOnlyTheNullObject.md) - [NumberTypeMatchesNumbers](docs/models/NumberTypeMatchesNumbers.md) - [ObjectPropertiesValidation](docs/models/ObjectPropertiesValidation.md) + - [ObjectTypeMatchesObjects](docs/models/ObjectTypeMatchesObjects.md) - [Oneof](docs/models/Oneof.md) - [OneofComplexTypes](docs/models/OneofComplexTypes.md) - [OneofWithBaseSchema](docs/models/OneofWithBaseSchema.md) 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 index 6b758ccf2b8..5f54a790b11 100644 --- 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 @@ -54,7 +54,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -62,7 +62,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -99,7 +99,6 @@ No authorization required ```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. @@ -133,10 +132,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -185,7 +184,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -193,7 +192,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -230,7 +229,6 @@ No authorization required ```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. @@ -264,10 +262,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -318,7 +316,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -326,7 +324,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -363,7 +361,6 @@ No authorization required ```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. @@ -397,10 +394,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -449,7 +446,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -457,7 +454,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -494,7 +491,6 @@ No authorization required ```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. @@ -528,10 +524,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.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 index 16996cfc810..8b598023479 100644 --- 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 @@ -61,7 +61,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -69,7 +69,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -106,7 +106,6 @@ No authorization required ```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. @@ -140,10 +139,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -192,7 +191,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -200,7 +199,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -237,7 +236,6 @@ No authorization required ```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. @@ -271,10 +269,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -323,7 +321,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -331,7 +329,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -368,7 +366,6 @@ No authorization required ```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. @@ -402,10 +399,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -454,7 +451,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -462,7 +459,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -499,7 +496,6 @@ No authorization required ```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. @@ -533,10 +529,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -585,7 +581,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -593,7 +589,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -630,7 +626,6 @@ No authorization required ```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. @@ -664,10 +659,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -716,7 +711,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -724,7 +719,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -761,7 +756,6 @@ No authorization required ```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. @@ -795,10 +789,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -847,7 +841,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -855,7 +849,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -892,7 +886,6 @@ No authorization required ```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. @@ -926,10 +919,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -978,7 +971,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -986,7 +979,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1023,7 +1016,6 @@ No authorization required ```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. @@ -1057,10 +1049,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1109,7 +1101,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1117,7 +1109,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -1154,7 +1146,6 @@ No authorization required ```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. @@ -1188,10 +1179,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.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 index 8f0a035a810..e5cc8fd7c88 100644 --- 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 @@ -53,7 +53,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -61,7 +61,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -98,7 +98,6 @@ No authorization required ```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. @@ -132,10 +131,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -184,7 +183,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -192,7 +191,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -229,7 +228,6 @@ No authorization required ```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. @@ -263,10 +261,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -315,7 +313,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -323,7 +321,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -360,7 +358,6 @@ No authorization required ```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. @@ -394,10 +391,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -446,7 +443,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -454,7 +451,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -491,7 +488,6 @@ No authorization required ```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. @@ -525,10 +521,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -577,7 +573,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -585,7 +581,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -622,7 +618,6 @@ No authorization required ```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. @@ -656,10 +651,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.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 index 0a1a6bd184c..7476fb33f5c 100644 --- 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 @@ -220,7 +220,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -228,7 +228,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -265,7 +265,6 @@ No authorization required ```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. @@ -299,10 +298,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -351,7 +350,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -359,7 +358,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -396,7 +395,6 @@ No authorization required ```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. @@ -430,10 +428,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -484,7 +482,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -492,7 +490,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -529,7 +527,6 @@ No authorization required ```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. @@ -563,10 +560,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -615,7 +612,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -623,7 +620,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -660,7 +657,6 @@ No authorization required ```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. @@ -694,10 +690,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -746,7 +742,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -754,7 +750,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -791,7 +787,6 @@ No authorization required ```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. @@ -825,10 +820,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -877,7 +872,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -885,7 +880,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -922,7 +917,6 @@ No authorization required ```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. @@ -956,10 +950,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -1008,7 +1002,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1016,7 +1010,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1053,7 +1047,6 @@ No authorization required ```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. @@ -1087,10 +1080,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1139,7 +1132,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1147,7 +1140,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1184,7 +1177,6 @@ No authorization required ```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. @@ -1218,10 +1210,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1270,7 +1262,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1278,7 +1270,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1315,7 +1307,6 @@ No authorization required ```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. @@ -1349,10 +1340,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1401,7 +1392,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1409,7 +1400,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1446,7 +1437,6 @@ No authorization required ```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. @@ -1480,10 +1470,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1532,7 +1522,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1540,7 +1530,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1577,7 +1567,6 @@ No authorization required ```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. @@ -1611,10 +1600,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1663,7 +1652,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1671,7 +1660,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1708,7 +1697,6 @@ No authorization required ```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. @@ -1742,10 +1730,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1794,7 +1782,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1802,7 +1790,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1839,7 +1827,6 @@ No authorization required ```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. @@ -1873,10 +1860,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1925,7 +1912,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1933,7 +1920,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1970,7 +1957,6 @@ No authorization required ```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. @@ -2004,10 +1990,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -2056,7 +2042,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2064,7 +2050,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2101,7 +2087,6 @@ No authorization required ```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. @@ -2135,10 +2120,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2187,7 +2172,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2195,7 +2180,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2232,7 +2217,6 @@ No authorization required ```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. @@ -2266,10 +2250,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2320,7 +2304,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2328,7 +2312,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2365,7 +2349,6 @@ No authorization required ```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. @@ -2399,10 +2382,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2425,6 +2408,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2438,7 +2422,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = True + body = BooleanTypeMatchesBooleans(True) try: api_response = api_instance.post_boolean_type_matches_booleans_request_body( body=body, @@ -2450,7 +2434,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2458,12 +2442,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Return Types, Responses @@ -2487,7 +2470,7 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> bool post_boolean_type_matches_booleans_response_body_for_content_types() +> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() @@ -2529,15 +2512,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Authorization @@ -2582,7 +2564,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2590,7 +2572,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2627,7 +2609,6 @@ No authorization required ```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. @@ -2661,10 +2642,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2713,7 +2694,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2721,7 +2702,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2758,7 +2739,6 @@ No authorization required ```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. @@ -2792,10 +2772,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2844,7 +2824,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2852,7 +2832,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2889,7 +2869,6 @@ No authorization required ```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. @@ -2923,10 +2902,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2949,6 +2928,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.date_time_format import DateTimeFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2962,7 +2942,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = DateTimeFormat(None) try: api_response = api_instance.post_date_time_format_request_body( body=body, @@ -2974,7 +2954,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2982,12 +2962,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -3011,7 +2990,7 @@ No authorization required # **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() +> DateTimeFormat post_date_time_format_response_body_for_content_types() @@ -3053,15 +3032,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -3080,6 +3058,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.email_format import EmailFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -3093,7 +3072,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = EmailFormat(None) try: api_response = api_instance.post_email_format_request_body( body=body, @@ -3105,7 +3084,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3113,12 +3092,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -3142,7 +3120,7 @@ No authorization required # **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() +> EmailFormat post_email_format_response_body_for_content_types() @@ -3184,15 +3162,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -3237,7 +3214,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3245,7 +3222,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3282,7 +3259,6 @@ No authorization required ```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. @@ -3316,10 +3292,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3368,7 +3344,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3376,7 +3352,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3413,7 +3389,6 @@ No authorization required ```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. @@ -3447,10 +3422,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3499,7 +3474,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3507,7 +3482,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3544,7 +3519,6 @@ No authorization required ```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. @@ -3578,10 +3552,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3630,7 +3604,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3638,7 +3612,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3675,7 +3649,6 @@ No authorization required ```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. @@ -3709,10 +3682,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3761,7 +3734,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3769,7 +3742,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3806,7 +3779,6 @@ No authorization required ```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. @@ -3840,10 +3812,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3895,7 +3867,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3903,7 +3875,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3940,7 +3912,6 @@ No authorization required ```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. @@ -3974,10 +3945,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -4026,7 +3997,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4034,7 +4005,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4071,7 +4042,6 @@ No authorization required ```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. @@ -4105,10 +4075,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4131,6 +4101,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.hostname_format import HostnameFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4144,7 +4115,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = HostnameFormat(None) try: api_response = api_instance.post_hostname_format_request_body( body=body, @@ -4156,7 +4127,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4164,12 +4135,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -4193,7 +4163,7 @@ No authorization required # **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() +> HostnameFormat post_hostname_format_response_body_for_content_types() @@ -4235,15 +4205,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -4262,6 +4231,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4275,7 +4245,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = 1 + body = IntegerTypeMatchesIntegers(1) try: api_response = api_instance.post_integer_type_matches_integers_request_body( body=body, @@ -4287,7 +4257,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4295,12 +4265,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -4324,7 +4293,7 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> int post_integer_type_matches_integers_response_body_for_content_types() +> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() @@ -4366,15 +4335,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -4419,7 +4387,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4427,7 +4395,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4464,7 +4432,6 @@ No authorization required ```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. @@ -4498,10 +4465,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4550,7 +4517,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4558,7 +4525,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4595,7 +4562,6 @@ No authorization required ```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. @@ -4629,10 +4595,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4655,6 +4621,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.ipv4_format import Ipv4Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4668,7 +4635,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv4Format(None) try: api_response = api_instance.post_ipv4_format_request_body( body=body, @@ -4680,7 +4647,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4688,12 +4655,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -4717,7 +4683,7 @@ No authorization required # **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() +> Ipv4Format post_ipv4_format_response_body_for_content_types() @@ -4759,15 +4725,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -4786,6 +4751,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.ipv6_format import Ipv6Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4799,7 +4765,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv6Format(None) try: api_response = api_instance.post_ipv6_format_request_body( body=body, @@ -4811,7 +4777,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4819,12 +4785,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -4848,7 +4813,7 @@ No authorization required # **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() +> Ipv6Format post_ipv6_format_response_body_for_content_types() @@ -4890,15 +4855,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -4917,6 +4881,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.json_pointer_format import JsonPointerFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4930,7 +4895,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = JsonPointerFormat(None) try: api_response = api_instance.post_json_pointer_format_request_body( body=body, @@ -4942,7 +4907,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4950,12 +4915,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -4979,7 +4943,7 @@ No authorization required # **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() +> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() @@ -5021,15 +4985,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -5074,7 +5037,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5082,7 +5045,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5119,7 +5082,6 @@ No authorization required ```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. @@ -5153,10 +5115,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5205,7 +5167,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5213,7 +5175,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5250,7 +5212,6 @@ No authorization required ```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. @@ -5284,10 +5245,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5336,7 +5297,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5344,7 +5305,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5381,7 +5342,6 @@ No authorization required ```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. @@ -5415,10 +5375,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5467,7 +5427,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5475,7 +5435,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5512,7 +5472,6 @@ No authorization required ```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. @@ -5546,10 +5505,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5598,7 +5557,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5606,7 +5565,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5643,7 +5602,6 @@ No authorization required ```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. @@ -5677,10 +5635,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5729,7 +5687,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5737,7 +5695,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5774,7 +5732,6 @@ No authorization required ```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. @@ -5808,10 +5765,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5860,7 +5817,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5868,7 +5825,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5905,7 +5862,6 @@ No authorization required ```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. @@ -5939,10 +5895,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5991,7 +5947,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5999,7 +5955,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -6036,7 +5992,6 @@ No authorization required ```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. @@ -6070,10 +6025,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -6122,7 +6077,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6130,7 +6085,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6167,7 +6122,6 @@ No authorization required ```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. @@ -6201,10 +6155,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6253,7 +6207,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6261,7 +6215,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6298,7 +6252,6 @@ No authorization required ```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. @@ -6332,10 +6285,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6384,7 +6337,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6392,7 +6345,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6429,7 +6382,6 @@ No authorization required ```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. @@ -6463,10 +6415,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6515,7 +6467,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6523,7 +6475,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6560,7 +6512,6 @@ No authorization required ```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. @@ -6594,10 +6545,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6646,7 +6597,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6654,7 +6605,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6691,7 +6642,6 @@ No authorization required ```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. @@ -6725,10 +6675,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6785,7 +6735,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6793,7 +6743,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6830,7 +6780,6 @@ No authorization required ```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. @@ -6864,10 +6813,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6916,7 +6865,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6924,7 +6873,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6961,7 +6910,6 @@ No authorization required ```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. @@ -6995,10 +6943,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -7021,6 +6969,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7034,7 +6983,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NotMoreComplexSchema(None) try: api_response = api_instance.post_not_more_complex_schema_request_body( body=body, @@ -7046,7 +6995,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7054,31 +7003,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -7102,7 +7031,7 @@ No authorization required # **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() +> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() @@ -7144,34 +7073,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -7190,6 +7099,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.model_not import ModelNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7203,7 +7113,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = ModelNot(None) try: api_response = api_instance.post_not_request_body( body=body, @@ -7215,7 +7125,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7223,25 +7133,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -7265,7 +7161,7 @@ No authorization required # **post_not_response_body_for_content_types** -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() +> ModelNot post_not_response_body_for_content_types() @@ -7307,28 +7203,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -7373,7 +7255,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7381,7 +7263,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7418,7 +7300,6 @@ No authorization required ```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. @@ -7452,10 +7333,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7478,6 +7359,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7491,7 +7373,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NullTypeMatchesOnlyTheNullObject(None) try: api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( body=body, @@ -7503,7 +7385,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7511,12 +7393,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Return Types, Responses @@ -7540,7 +7421,7 @@ No authorization required # **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() +> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() @@ -7582,15 +7463,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Authorization @@ -7609,6 +7489,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7622,7 +7503,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = 3.14 + body = NumberTypeMatchesNumbers(3.14) try: api_response = api_instance.post_number_type_matches_numbers_request_body( body=body, @@ -7634,7 +7515,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7642,12 +7523,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Return Types, Responses @@ -7671,7 +7551,7 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> int, float post_number_type_matches_numbers_response_body_for_content_types() +> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() @@ -7713,15 +7593,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Authorization @@ -7766,7 +7645,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7774,7 +7653,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7811,7 +7690,6 @@ No authorization required ```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. @@ -7845,10 +7723,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7871,6 +7749,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.object_type_matches_objects import ObjectTypeMatchesObjects from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7884,7 +7763,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = dict() + body = ObjectTypeMatchesObjects() try: api_response = api_instance.post_object_type_matches_objects_request_body( body=body, @@ -7896,7 +7775,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7904,12 +7783,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Return Types, Responses @@ -7933,7 +7811,7 @@ No authorization required # **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() +> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() @@ -7975,15 +7853,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Authorization @@ -8028,7 +7905,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8036,7 +7913,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -8073,7 +7950,6 @@ No authorization required ```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. @@ -8107,10 +7983,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -8159,7 +8035,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8167,7 +8043,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8204,7 +8080,6 @@ No authorization required ```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. @@ -8238,10 +8113,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8290,7 +8165,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8298,7 +8173,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8335,7 +8210,6 @@ No authorization required ```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. @@ -8369,10 +8243,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8421,7 +8295,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8429,7 +8303,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8466,7 +8340,6 @@ No authorization required ```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. @@ -8500,10 +8373,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8552,7 +8425,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8560,7 +8433,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8597,7 +8470,6 @@ No authorization required ```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. @@ -8631,10 +8503,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8683,7 +8555,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8691,7 +8563,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8728,7 +8600,6 @@ No authorization required ```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. @@ -8762,10 +8633,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8814,7 +8685,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8822,7 +8693,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8859,7 +8730,6 @@ No authorization required ```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. @@ -8893,10 +8763,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8945,7 +8815,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8953,7 +8823,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8990,7 +8860,6 @@ No authorization required ```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. @@ -9024,10 +8893,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -9076,7 +8945,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9084,7 +8953,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -9121,7 +8990,6 @@ No authorization required ```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. @@ -9155,10 +9023,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -9209,7 +9077,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9217,7 +9085,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9254,7 +9122,6 @@ No authorization required ```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. @@ -9288,10 +9155,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9340,7 +9207,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9348,7 +9215,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9385,7 +9252,6 @@ No authorization required ```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. @@ -9419,10 +9285,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9471,7 +9337,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9479,7 +9345,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9516,7 +9382,6 @@ No authorization required ```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. @@ -9550,10 +9415,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9604,7 +9469,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9612,7 +9477,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9649,7 +9514,6 @@ No authorization required ```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. @@ -9683,10 +9547,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9709,7 +9573,7 @@ No authorization required ```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 unit_test_api.model.ref_in_not import RefInNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -9723,7 +9587,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RefInNot(None) try: api_response = api_instance.post_ref_in_not_request_body( body=body, @@ -9735,7 +9599,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9743,18 +9607,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -9778,7 +9635,7 @@ No authorization required # **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() +> RefInNot post_ref_in_not_response_body_for_content_types() @@ -9787,7 +9644,6 @@ No authorization required ```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. @@ -9821,21 +9677,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -9880,7 +9729,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9888,7 +9737,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9925,7 +9774,6 @@ No authorization required ```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. @@ -9959,10 +9807,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -10011,7 +9859,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10019,7 +9867,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -10056,7 +9904,6 @@ No authorization required ```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. @@ -10090,10 +9937,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -10142,7 +9989,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10150,7 +9997,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10187,7 +10034,6 @@ No authorization required ```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. @@ -10221,10 +10067,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10273,7 +10119,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10281,7 +10127,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10318,7 +10164,6 @@ No authorization required ```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. @@ -10352,10 +10197,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10404,7 +10249,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10412,7 +10257,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10449,7 +10294,6 @@ No authorization required ```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. @@ -10483,10 +10327,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10509,6 +10353,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -10522,7 +10367,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RequiredWithEscapedCharacters(None) try: api_response = api_instance.post_required_with_escaped_characters_request_body( body=body, @@ -10534,7 +10379,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10542,12 +10387,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -10571,7 +10415,7 @@ No authorization required # **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() +> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() @@ -10613,15 +10457,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -10666,7 +10509,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10674,7 +10517,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10711,7 +10554,6 @@ No authorization required ```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. @@ -10745,10 +10587,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10771,6 +10613,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -10784,7 +10627,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = "body_example" + body = StringTypeMatchesStrings("body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -10796,7 +10639,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10804,12 +10647,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Return Types, Responses @@ -10833,7 +10675,7 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> str post_string_type_matches_strings_response_body_for_content_types() +> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() @@ -10875,15 +10717,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Authorization @@ -10930,7 +10771,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10938,7 +10779,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10975,7 +10816,6 @@ No authorization required ```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. @@ -11009,10 +10849,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -11061,7 +10901,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11069,7 +10909,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -11106,7 +10946,6 @@ No authorization required ```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. @@ -11140,10 +10979,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -11192,7 +11031,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11200,7 +11039,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11237,7 +11076,6 @@ No authorization required ```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. @@ -11271,10 +11109,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11297,6 +11135,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.uri_format import UriFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -11310,7 +11149,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriFormat(None) try: api_response = api_instance.post_uri_format_request_body( body=body, @@ -11322,7 +11161,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11330,12 +11169,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -11359,7 +11197,7 @@ No authorization required # **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() +> UriFormat post_uri_format_response_body_for_content_types() @@ -11401,15 +11239,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -11428,6 +11265,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.uri_reference_format import UriReferenceFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -11441,7 +11279,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriReferenceFormat(None) try: api_response = api_instance.post_uri_reference_format_request_body( body=body, @@ -11453,7 +11291,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11461,12 +11299,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -11490,7 +11327,7 @@ No authorization required # **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() +> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() @@ -11532,15 +11369,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -11559,6 +11395,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import content_type_json_api +from unit_test_api.model.uri_template_format import UriTemplateFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -11572,7 +11409,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = content_type_json_api.ContentTypeJsonApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriTemplateFormat(None) try: api_response = api_instance.post_uri_template_format_request_body( body=body, @@ -11584,7 +11421,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11592,12 +11429,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 @@ -11621,7 +11457,7 @@ No authorization required # **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() +> UriTemplateFormat post_uri_template_format_response_body_for_content_types() @@ -11663,15 +11499,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 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 index 4fb214ed39a..eb7c0a908df 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -180,7 +179,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -188,7 +187,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -225,7 +224,6 @@ No authorization required ```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. @@ -259,10 +257,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.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 index ec345869090..2ce684e410c 100644 --- 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 @@ -59,7 +59,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -67,7 +67,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -104,7 +104,6 @@ No authorization required ```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. @@ -138,10 +137,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -190,7 +189,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -198,7 +197,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -235,7 +234,6 @@ No authorization required ```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. @@ -269,10 +267,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -321,7 +319,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -329,7 +327,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -366,7 +364,6 @@ No authorization required ```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. @@ -400,10 +397,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -452,7 +449,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -460,7 +457,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -497,7 +494,6 @@ No authorization required ```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. @@ -531,10 +527,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -583,7 +579,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -591,7 +587,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -628,7 +624,6 @@ No authorization required ```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. @@ -662,10 +657,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -717,7 +712,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -725,7 +720,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -762,7 +757,6 @@ No authorization required ```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. @@ -796,10 +790,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -848,7 +842,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -856,7 +850,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -893,7 +887,6 @@ No authorization required ```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. @@ -927,10 +920,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -979,7 +972,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -987,7 +980,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -1024,7 +1017,6 @@ No authorization required ```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. @@ -1058,10 +1050,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.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 index 08431f22e69..5678e0ac5cd 100644 --- 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 @@ -35,6 +35,7 @@ Method | HTTP request | Description ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.date_time_format import DateTimeFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -48,7 +49,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = DateTimeFormat(None) try: api_response = api_instance.post_date_time_format_request_body( body=body, @@ -60,7 +61,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -68,12 +69,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -97,7 +97,7 @@ No authorization required # **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() +> DateTimeFormat post_date_time_format_response_body_for_content_types() @@ -139,15 +139,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -166,6 +165,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.email_format import EmailFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -179,7 +179,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = EmailFormat(None) try: api_response = api_instance.post_email_format_request_body( body=body, @@ -191,7 +191,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -199,12 +199,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -228,7 +227,7 @@ No authorization required # **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() +> EmailFormat post_email_format_response_body_for_content_types() @@ -270,15 +269,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -297,6 +295,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.hostname_format import HostnameFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -310,7 +309,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = HostnameFormat(None) try: api_response = api_instance.post_hostname_format_request_body( body=body, @@ -322,7 +321,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -330,12 +329,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -359,7 +357,7 @@ No authorization required # **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() +> HostnameFormat post_hostname_format_response_body_for_content_types() @@ -401,15 +399,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -428,6 +425,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.ipv4_format import Ipv4Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -441,7 +439,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv4Format(None) try: api_response = api_instance.post_ipv4_format_request_body( body=body, @@ -453,7 +451,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -461,12 +459,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -490,7 +487,7 @@ No authorization required # **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() +> Ipv4Format post_ipv4_format_response_body_for_content_types() @@ -532,15 +529,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -559,6 +555,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.ipv6_format import Ipv6Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -572,7 +569,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv6Format(None) try: api_response = api_instance.post_ipv6_format_request_body( body=body, @@ -584,7 +581,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -592,12 +589,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -621,7 +617,7 @@ No authorization required # **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() +> Ipv6Format post_ipv6_format_response_body_for_content_types() @@ -663,15 +659,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -690,6 +685,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.json_pointer_format import JsonPointerFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -703,7 +699,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = JsonPointerFormat(None) try: api_response = api_instance.post_json_pointer_format_request_body( body=body, @@ -715,7 +711,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -723,12 +719,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -752,7 +747,7 @@ No authorization required # **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() +> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() @@ -794,15 +789,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -821,6 +815,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.uri_format import UriFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -834,7 +829,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriFormat(None) try: api_response = api_instance.post_uri_format_request_body( body=body, @@ -846,7 +841,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -854,12 +849,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -883,7 +877,7 @@ No authorization required # **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() +> UriFormat post_uri_format_response_body_for_content_types() @@ -925,15 +919,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -952,6 +945,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.uri_reference_format import UriReferenceFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -965,7 +959,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriReferenceFormat(None) try: api_response = api_instance.post_uri_reference_format_request_body( body=body, @@ -977,7 +971,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -985,12 +979,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -1014,7 +1007,7 @@ No authorization required # **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() +> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() @@ -1056,15 +1049,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -1083,6 +1075,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import format_api +from unit_test_api.model.uri_template_format import UriTemplateFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1096,7 +1089,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = format_api.FormatApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriTemplateFormat(None) try: api_response = api_instance.post_uri_template_format_request_body( body=body, @@ -1108,7 +1101,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1116,12 +1109,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 @@ -1145,7 +1137,7 @@ No authorization required # **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() +> UriTemplateFormat post_uri_template_format_response_body_for_content_types() @@ -1187,15 +1179,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 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 index a3892956f16..3eac0810cff 100644 --- 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 @@ -53,7 +53,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -61,7 +61,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -98,7 +98,6 @@ No authorization required ```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. @@ -132,10 +131,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.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 index 481d933e61f..deb85e59d0b 100644 --- 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 @@ -45,7 +45,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -53,7 +53,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -90,7 +90,6 @@ No authorization required ```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. @@ -124,10 +123,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.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 index 98d63d49245..5a4d1522dfd 100644 --- 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 @@ -45,7 +45,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -53,7 +53,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -90,7 +90,6 @@ No authorization required ```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. @@ -124,10 +123,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.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 index 30bb70e217f..d26877b2145 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -178,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -186,7 +185,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -223,7 +222,6 @@ No authorization required ```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. @@ -257,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.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 index 388aa8b796a..b2fc19f34c4 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -178,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -186,7 +185,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -223,7 +222,6 @@ No authorization required ```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. @@ -257,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.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 index 47fece84820..fbe1337b372 100644 --- 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 @@ -45,7 +45,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -53,7 +53,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -90,7 +90,6 @@ No authorization required ```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. @@ -124,10 +123,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.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 index 918d02f43ef..4107597e132 100644 --- 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 @@ -45,7 +45,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -53,7 +53,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -90,7 +90,6 @@ No authorization required ```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. @@ -124,10 +123,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.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 index 7d44da6f0b4..6d02ed479b1 100644 --- 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 @@ -45,7 +45,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -53,7 +53,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -90,7 +90,6 @@ No authorization required ```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. @@ -124,10 +123,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.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 index b176533c963..76bb9154983 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -178,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -186,7 +185,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -223,7 +222,6 @@ No authorization required ```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. @@ -257,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.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 index 0c1ab7ec02d..cf1e2949ca4 100644 --- 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 @@ -49,7 +49,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -57,7 +57,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -94,7 +94,6 @@ No authorization required ```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. @@ -128,10 +127,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -154,6 +153,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import model_not_api +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -167,7 +167,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = model_not_api.ModelNotApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NotMoreComplexSchema(None) try: api_response = api_instance.post_not_more_complex_schema_request_body( body=body, @@ -179,7 +179,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -187,31 +187,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -235,7 +215,7 @@ No authorization required # **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() +> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() @@ -277,34 +257,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -323,6 +283,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import model_not_api +from unit_test_api.model.model_not import ModelNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -336,7 +297,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = model_not_api.ModelNotApi(api_client) # example passing only required values which don't have defaults set - body = None + body = ModelNot(None) try: api_response = api_instance.post_not_request_body( body=body, @@ -348,7 +309,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -356,25 +317,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -398,7 +345,7 @@ No authorization required # **post_not_response_body_for_content_types** -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() +> ModelNot post_not_response_body_for_content_types() @@ -440,28 +387,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization 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 index dae45d4773b..7e23285ae43 100644 --- 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 @@ -51,7 +51,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -59,7 +59,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -96,7 +96,6 @@ No authorization required ```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. @@ -130,10 +129,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -182,7 +181,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -190,7 +189,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -227,7 +226,6 @@ No authorization required ```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. @@ -261,10 +259,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -313,7 +311,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -321,7 +319,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -358,7 +356,6 @@ No authorization required ```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. @@ -392,10 +389,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -444,7 +441,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -452,7 +449,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -489,7 +486,6 @@ No authorization required ```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. @@ -523,10 +519,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.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 index 9f6c2b244d0..e4a803a45a6 100644 --- 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 @@ -55,7 +55,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -63,7 +63,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -100,7 +100,6 @@ No authorization required ```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. @@ -134,10 +133,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -186,7 +185,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -194,7 +193,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -231,7 +230,6 @@ No authorization required ```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. @@ -265,10 +263,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -317,7 +315,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -325,7 +323,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -362,7 +360,6 @@ No authorization required ```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. @@ -396,10 +393,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -448,7 +445,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -456,7 +453,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -493,7 +490,6 @@ No authorization required ```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. @@ -527,10 +523,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -579,7 +575,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -587,7 +583,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -624,7 +620,6 @@ No authorization required ```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. @@ -658,10 +653,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -710,7 +705,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -718,7 +713,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -755,7 +750,6 @@ No authorization required ```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. @@ -789,10 +783,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.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 index b483f613cc3..220a343e6ca 100644 --- 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 @@ -133,7 +133,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -141,7 +141,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -204,7 +204,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -212,7 +212,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -277,7 +277,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -285,7 +285,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -348,7 +348,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -356,7 +356,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -419,7 +419,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -427,7 +427,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -490,7 +490,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -498,7 +498,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -561,7 +561,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -569,7 +569,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -632,7 +632,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -640,7 +640,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -703,7 +703,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -711,7 +711,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -774,7 +774,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -782,7 +782,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -845,7 +845,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -853,7 +853,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -916,7 +916,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -924,7 +924,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -987,7 +987,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -995,7 +995,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1058,7 +1058,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1066,7 +1066,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1129,7 +1129,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1137,7 +1137,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -1200,7 +1200,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1208,7 +1208,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -1273,7 +1273,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1281,7 +1281,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -1318,6 +1318,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1331,7 +1332,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = True + body = BooleanTypeMatchesBooleans(True) try: api_response = api_instance.post_boolean_type_matches_booleans_request_body( body=body, @@ -1343,7 +1344,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1351,12 +1352,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Return Types, Responses @@ -1415,7 +1415,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1423,7 +1423,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -1486,7 +1486,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1494,7 +1494,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -1557,7 +1557,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1565,7 +1565,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -1602,6 +1602,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.date_time_format import DateTimeFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1615,7 +1616,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = DateTimeFormat(None) try: api_response = api_instance.post_date_time_format_request_body( body=body, @@ -1627,7 +1628,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1635,12 +1636,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -1673,6 +1673,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.email_format import EmailFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1686,7 +1687,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = EmailFormat(None) try: api_response = api_instance.post_email_format_request_body( body=body, @@ -1698,7 +1699,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1706,12 +1707,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -1770,7 +1770,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1778,7 +1778,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -1841,7 +1841,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1849,7 +1849,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -1912,7 +1912,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1920,7 +1920,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -1983,7 +1983,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1991,7 +1991,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -2054,7 +2054,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2062,7 +2062,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -2128,7 +2128,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2136,7 +2136,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -2199,7 +2199,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2207,7 +2207,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -2244,6 +2244,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.hostname_format import HostnameFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2257,7 +2258,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = HostnameFormat(None) try: api_response = api_instance.post_hostname_format_request_body( body=body, @@ -2269,7 +2270,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2277,12 +2278,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -2315,6 +2315,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2328,7 +2329,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = 1 + body = IntegerTypeMatchesIntegers(1) try: api_response = api_instance.post_integer_type_matches_integers_request_body( body=body, @@ -2340,7 +2341,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2348,12 +2349,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -2412,7 +2412,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2420,7 +2420,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -2483,7 +2483,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2491,7 +2491,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -2528,6 +2528,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.ipv4_format import Ipv4Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2541,7 +2542,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv4Format(None) try: api_response = api_instance.post_ipv4_format_request_body( body=body, @@ -2553,7 +2554,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2561,12 +2562,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -2599,6 +2599,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.ipv6_format import Ipv6Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2612,7 +2613,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv6Format(None) try: api_response = api_instance.post_ipv6_format_request_body( body=body, @@ -2624,7 +2625,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2632,12 +2633,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -2670,6 +2670,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.json_pointer_format import JsonPointerFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2683,7 +2684,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = JsonPointerFormat(None) try: api_response = api_instance.post_json_pointer_format_request_body( body=body, @@ -2695,7 +2696,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2703,12 +2704,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -2767,7 +2767,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2775,7 +2775,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -2838,7 +2838,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2846,7 +2846,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -2909,7 +2909,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2917,7 +2917,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -2980,7 +2980,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2988,7 +2988,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -3051,7 +3051,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3059,7 +3059,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -3122,7 +3122,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3130,7 +3130,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -3193,7 +3193,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3201,7 +3201,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -3264,7 +3264,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3272,7 +3272,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -3335,7 +3335,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3343,7 +3343,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -3406,7 +3406,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3414,7 +3414,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -3477,7 +3477,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3485,7 +3485,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -3548,7 +3548,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3556,7 +3556,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -3619,7 +3619,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3627,7 +3627,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -3698,7 +3698,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3706,7 +3706,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -3769,7 +3769,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3777,7 +3777,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -3814,6 +3814,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -3827,7 +3828,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NotMoreComplexSchema(None) try: api_response = api_instance.post_not_more_complex_schema_request_body( body=body, @@ -3839,7 +3840,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3847,31 +3848,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -3904,6 +3885,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.model_not import ModelNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -3917,7 +3899,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = ModelNot(None) try: api_response = api_instance.post_not_request_body( body=body, @@ -3929,7 +3911,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3937,25 +3919,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -4014,7 +3982,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4022,7 +3990,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -4059,6 +4027,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4072,7 +4041,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NullTypeMatchesOnlyTheNullObject(None) try: api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( body=body, @@ -4084,7 +4053,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4092,12 +4061,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Return Types, Responses @@ -4130,6 +4098,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4143,7 +4112,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = 3.14 + body = NumberTypeMatchesNumbers(3.14) try: api_response = api_instance.post_number_type_matches_numbers_request_body( body=body, @@ -4155,7 +4124,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4163,12 +4132,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Return Types, Responses @@ -4227,7 +4195,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4235,7 +4203,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -4272,6 +4240,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.object_type_matches_objects import ObjectTypeMatchesObjects from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4285,7 +4254,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = dict() + body = ObjectTypeMatchesObjects() try: api_response = api_instance.post_object_type_matches_objects_request_body( body=body, @@ -4297,7 +4266,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4305,12 +4274,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Return Types, Responses @@ -4369,7 +4337,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4377,7 +4345,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -4440,7 +4408,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4448,7 +4416,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -4511,7 +4479,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4519,7 +4487,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -4582,7 +4550,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4590,7 +4558,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -4653,7 +4621,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4661,7 +4629,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -4724,7 +4692,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4732,7 +4700,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -4795,7 +4763,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4803,7 +4771,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -4866,7 +4834,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4874,7 +4842,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -4937,7 +4905,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4945,7 +4913,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -5010,7 +4978,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5018,7 +4986,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -5081,7 +5049,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5089,7 +5057,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -5152,7 +5120,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5160,7 +5128,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -5225,7 +5193,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5233,7 +5201,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -5270,7 +5238,7 @@ No authorization required ```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 unit_test_api.model.ref_in_not import RefInNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -5284,7 +5252,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RefInNot(None) try: api_response = api_instance.post_ref_in_not_request_body( body=body, @@ -5296,7 +5264,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5304,18 +5272,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -5374,7 +5335,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5382,7 +5343,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -5445,7 +5406,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5453,7 +5414,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -5516,7 +5477,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5524,7 +5485,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -5587,7 +5548,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5595,7 +5556,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -5658,7 +5619,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5666,7 +5627,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -5703,6 +5664,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -5716,7 +5678,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RequiredWithEscapedCharacters(None) try: api_response = api_instance.post_required_with_escaped_characters_request_body( body=body, @@ -5728,7 +5690,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5736,12 +5698,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -5800,7 +5761,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5808,7 +5769,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -5845,6 +5806,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -5858,7 +5820,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = "body_example" + body = StringTypeMatchesStrings("body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -5870,7 +5832,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5878,12 +5840,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Return Types, Responses @@ -5944,7 +5905,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5952,7 +5913,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -6015,7 +5976,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6023,7 +5984,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -6086,7 +6047,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6094,7 +6055,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -6131,6 +6092,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.uri_format import UriFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -6144,7 +6106,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriFormat(None) try: api_response = api_instance.post_uri_format_request_body( body=body, @@ -6156,7 +6118,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6164,12 +6126,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -6202,6 +6163,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.uri_reference_format import UriReferenceFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -6215,7 +6177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriReferenceFormat(None) try: api_response = api_instance.post_uri_reference_format_request_body( body=body, @@ -6227,7 +6189,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6235,12 +6197,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -6273,6 +6234,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import operation_request_body_api +from unit_test_api.model.uri_template_format import UriTemplateFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -6286,7 +6248,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriTemplateFormat(None) try: api_response = api_instance.post_uri_template_format_request_body( body=body, @@ -6298,7 +6260,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6306,12 +6268,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 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 index f59e95a4c93..6a6956c4d7c 100644 --- 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 @@ -220,7 +220,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -228,7 +228,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -265,7 +265,6 @@ No authorization required ```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. @@ -299,10 +298,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -351,7 +350,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -359,7 +358,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -396,7 +395,6 @@ No authorization required ```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. @@ -430,10 +428,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -484,7 +482,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -492,7 +490,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -529,7 +527,6 @@ No authorization required ```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. @@ -563,10 +560,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -615,7 +612,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -623,7 +620,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -660,7 +657,6 @@ No authorization required ```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. @@ -694,10 +690,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -746,7 +742,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -754,7 +750,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -791,7 +787,6 @@ No authorization required ```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. @@ -825,10 +820,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -877,7 +872,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -885,7 +880,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -922,7 +917,6 @@ No authorization required ```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. @@ -956,10 +950,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -1008,7 +1002,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1016,7 +1010,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1053,7 +1047,6 @@ No authorization required ```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. @@ -1087,10 +1080,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1139,7 +1132,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1147,7 +1140,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1184,7 +1177,6 @@ No authorization required ```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. @@ -1218,10 +1210,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1270,7 +1262,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1278,7 +1270,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1315,7 +1307,6 @@ No authorization required ```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. @@ -1349,10 +1340,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1401,7 +1392,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1409,7 +1400,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1446,7 +1437,6 @@ No authorization required ```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. @@ -1480,10 +1470,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1532,7 +1522,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1540,7 +1530,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1577,7 +1567,6 @@ No authorization required ```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. @@ -1611,10 +1600,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1663,7 +1652,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1671,7 +1660,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1708,7 +1697,6 @@ No authorization required ```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. @@ -1742,10 +1730,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1794,7 +1782,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1802,7 +1790,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1839,7 +1827,6 @@ No authorization required ```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. @@ -1873,10 +1860,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1925,7 +1912,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1933,7 +1920,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1970,7 +1957,6 @@ No authorization required ```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. @@ -2004,10 +1990,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -2056,7 +2042,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2064,7 +2050,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2101,7 +2087,6 @@ No authorization required ```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. @@ -2135,10 +2120,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2187,7 +2172,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2195,7 +2180,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2232,7 +2217,6 @@ No authorization required ```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. @@ -2266,10 +2250,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2320,7 +2304,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2328,7 +2312,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2365,7 +2349,6 @@ No authorization required ```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. @@ -2399,10 +2382,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2425,6 +2408,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2438,7 +2422,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = True + body = BooleanTypeMatchesBooleans(True) try: api_response = api_instance.post_boolean_type_matches_booleans_request_body( body=body, @@ -2450,7 +2434,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2458,12 +2442,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Return Types, Responses @@ -2487,7 +2470,7 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> bool post_boolean_type_matches_booleans_response_body_for_content_types() +> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() @@ -2529,15 +2512,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Authorization @@ -2582,7 +2564,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2590,7 +2572,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2627,7 +2609,6 @@ No authorization required ```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. @@ -2661,10 +2642,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2713,7 +2694,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2721,7 +2702,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2758,7 +2739,6 @@ No authorization required ```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. @@ -2792,10 +2772,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2844,7 +2824,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2852,7 +2832,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2889,7 +2869,6 @@ No authorization required ```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. @@ -2923,10 +2902,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2949,6 +2928,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.date_time_format import DateTimeFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2962,7 +2942,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = DateTimeFormat(None) try: api_response = api_instance.post_date_time_format_request_body( body=body, @@ -2974,7 +2954,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -2982,12 +2962,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -3011,7 +2990,7 @@ No authorization required # **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() +> DateTimeFormat post_date_time_format_response_body_for_content_types() @@ -3053,15 +3032,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -3080,6 +3058,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.email_format import EmailFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -3093,7 +3072,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = EmailFormat(None) try: api_response = api_instance.post_email_format_request_body( body=body, @@ -3105,7 +3084,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3113,12 +3092,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -3142,7 +3120,7 @@ No authorization required # **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() +> EmailFormat post_email_format_response_body_for_content_types() @@ -3184,15 +3162,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -3237,7 +3214,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3245,7 +3222,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3282,7 +3259,6 @@ No authorization required ```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. @@ -3316,10 +3292,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3368,7 +3344,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3376,7 +3352,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3413,7 +3389,6 @@ No authorization required ```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. @@ -3447,10 +3422,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3499,7 +3474,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3507,7 +3482,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3544,7 +3519,6 @@ No authorization required ```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. @@ -3578,10 +3552,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3630,7 +3604,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3638,7 +3612,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3675,7 +3649,6 @@ No authorization required ```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. @@ -3709,10 +3682,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3761,7 +3734,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3769,7 +3742,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3806,7 +3779,6 @@ No authorization required ```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. @@ -3840,10 +3812,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3895,7 +3867,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -3903,7 +3875,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3940,7 +3912,6 @@ No authorization required ```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. @@ -3974,10 +3945,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -4026,7 +3997,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4034,7 +4005,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4071,7 +4042,6 @@ No authorization required ```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. @@ -4105,10 +4075,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4131,6 +4101,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.hostname_format import HostnameFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4144,7 +4115,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = HostnameFormat(None) try: api_response = api_instance.post_hostname_format_request_body( body=body, @@ -4156,7 +4127,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4164,12 +4135,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -4193,7 +4163,7 @@ No authorization required # **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() +> HostnameFormat post_hostname_format_response_body_for_content_types() @@ -4235,15 +4205,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -4262,6 +4231,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4275,7 +4245,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = 1 + body = IntegerTypeMatchesIntegers(1) try: api_response = api_instance.post_integer_type_matches_integers_request_body( body=body, @@ -4287,7 +4257,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4295,12 +4265,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -4324,7 +4293,7 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> int post_integer_type_matches_integers_response_body_for_content_types() +> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() @@ -4366,15 +4335,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -4419,7 +4387,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4427,7 +4395,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4464,7 +4432,6 @@ No authorization required ```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. @@ -4498,10 +4465,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4550,7 +4517,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4558,7 +4525,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4595,7 +4562,6 @@ No authorization required ```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. @@ -4629,10 +4595,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4655,6 +4621,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.ipv4_format import Ipv4Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4668,7 +4635,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv4Format(None) try: api_response = api_instance.post_ipv4_format_request_body( body=body, @@ -4680,7 +4647,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4688,12 +4655,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -4717,7 +4683,7 @@ No authorization required # **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() +> Ipv4Format post_ipv4_format_response_body_for_content_types() @@ -4759,15 +4725,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -4786,6 +4751,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.ipv6_format import Ipv6Format from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4799,7 +4765,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = Ipv6Format(None) try: api_response = api_instance.post_ipv6_format_request_body( body=body, @@ -4811,7 +4777,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4819,12 +4785,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -4848,7 +4813,7 @@ No authorization required # **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() +> Ipv6Format post_ipv6_format_response_body_for_content_types() @@ -4890,15 +4855,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -4917,6 +4881,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.json_pointer_format import JsonPointerFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4930,7 +4895,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = JsonPointerFormat(None) try: api_response = api_instance.post_json_pointer_format_request_body( body=body, @@ -4942,7 +4907,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -4950,12 +4915,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -4979,7 +4943,7 @@ No authorization required # **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() +> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() @@ -5021,15 +4985,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -5074,7 +5037,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5082,7 +5045,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5119,7 +5082,6 @@ No authorization required ```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. @@ -5153,10 +5115,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5205,7 +5167,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5213,7 +5175,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5250,7 +5212,6 @@ No authorization required ```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. @@ -5284,10 +5245,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5336,7 +5297,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5344,7 +5305,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5381,7 +5342,6 @@ No authorization required ```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. @@ -5415,10 +5375,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5467,7 +5427,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5475,7 +5435,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5512,7 +5472,6 @@ No authorization required ```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. @@ -5546,10 +5505,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5598,7 +5557,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5606,7 +5565,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5643,7 +5602,6 @@ No authorization required ```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. @@ -5677,10 +5635,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5729,7 +5687,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5737,7 +5695,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5774,7 +5732,6 @@ No authorization required ```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. @@ -5808,10 +5765,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5860,7 +5817,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5868,7 +5825,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5905,7 +5862,6 @@ No authorization required ```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. @@ -5939,10 +5895,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5991,7 +5947,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -5999,7 +5955,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -6036,7 +5992,6 @@ No authorization required ```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. @@ -6070,10 +6025,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -6122,7 +6077,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6130,7 +6085,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6167,7 +6122,6 @@ No authorization required ```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. @@ -6201,10 +6155,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6253,7 +6207,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6261,7 +6215,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6298,7 +6252,6 @@ No authorization required ```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. @@ -6332,10 +6285,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6384,7 +6337,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6392,7 +6345,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6429,7 +6382,6 @@ No authorization required ```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. @@ -6463,10 +6415,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6515,7 +6467,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6523,7 +6475,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6560,7 +6512,6 @@ No authorization required ```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. @@ -6594,10 +6545,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6646,7 +6597,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6654,7 +6605,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6691,7 +6642,6 @@ No authorization required ```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. @@ -6725,10 +6675,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6785,7 +6735,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6793,7 +6743,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6830,7 +6780,6 @@ No authorization required ```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. @@ -6864,10 +6813,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6916,7 +6865,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -6924,7 +6873,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6961,7 +6910,6 @@ No authorization required ```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. @@ -6995,10 +6943,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -7021,6 +6969,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7034,7 +6983,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NotMoreComplexSchema(None) try: api_response = api_instance.post_not_more_complex_schema_request_body( body=body, @@ -7046,7 +6995,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7054,31 +7003,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -7102,7 +7031,7 @@ No authorization required # **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() +> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() @@ -7144,34 +7073,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -7190,6 +7099,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.model_not import ModelNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7203,7 +7113,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = ModelNot(None) try: api_response = api_instance.post_not_request_body( body=body, @@ -7215,7 +7125,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7223,25 +7133,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -7265,7 +7161,7 @@ No authorization required # **post_not_response_body_for_content_types** -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() +> ModelNot post_not_response_body_for_content_types() @@ -7307,28 +7203,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -7373,7 +7255,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7381,7 +7263,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7418,7 +7300,6 @@ No authorization required ```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. @@ -7452,10 +7333,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7478,6 +7359,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7491,7 +7373,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NullTypeMatchesOnlyTheNullObject(None) try: api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( body=body, @@ -7503,7 +7385,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7511,12 +7393,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Return Types, Responses @@ -7540,7 +7421,7 @@ No authorization required # **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() +> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() @@ -7582,15 +7463,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Authorization @@ -7609,6 +7489,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7622,7 +7503,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = 3.14 + body = NumberTypeMatchesNumbers(3.14) try: api_response = api_instance.post_number_type_matches_numbers_request_body( body=body, @@ -7634,7 +7515,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7642,12 +7523,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Return Types, Responses @@ -7671,7 +7551,7 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> int, float post_number_type_matches_numbers_response_body_for_content_types() +> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() @@ -7713,15 +7593,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Authorization @@ -7766,7 +7645,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7774,7 +7653,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7811,7 +7690,6 @@ No authorization required ```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. @@ -7845,10 +7723,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7871,6 +7749,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.object_type_matches_objects import ObjectTypeMatchesObjects from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -7884,7 +7763,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = dict() + body = ObjectTypeMatchesObjects() try: api_response = api_instance.post_object_type_matches_objects_request_body( body=body, @@ -7896,7 +7775,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -7904,12 +7783,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Return Types, Responses @@ -7933,7 +7811,7 @@ No authorization required # **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() +> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() @@ -7975,15 +7853,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Authorization @@ -8028,7 +7905,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8036,7 +7913,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -8073,7 +7950,6 @@ No authorization required ```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. @@ -8107,10 +7983,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -8159,7 +8035,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8167,7 +8043,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8204,7 +8080,6 @@ No authorization required ```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. @@ -8238,10 +8113,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8290,7 +8165,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8298,7 +8173,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8335,7 +8210,6 @@ No authorization required ```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. @@ -8369,10 +8243,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8421,7 +8295,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8429,7 +8303,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8466,7 +8340,6 @@ No authorization required ```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. @@ -8500,10 +8373,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8552,7 +8425,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8560,7 +8433,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8597,7 +8470,6 @@ No authorization required ```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. @@ -8631,10 +8503,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8683,7 +8555,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8691,7 +8563,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8728,7 +8600,6 @@ No authorization required ```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. @@ -8762,10 +8633,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8814,7 +8685,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8822,7 +8693,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8859,7 +8730,6 @@ No authorization required ```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. @@ -8893,10 +8763,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8945,7 +8815,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -8953,7 +8823,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8990,7 +8860,6 @@ No authorization required ```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. @@ -9024,10 +8893,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -9076,7 +8945,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9084,7 +8953,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -9121,7 +8990,6 @@ No authorization required ```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. @@ -9155,10 +9023,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -9209,7 +9077,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9217,7 +9085,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9254,7 +9122,6 @@ No authorization required ```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. @@ -9288,10 +9155,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9340,7 +9207,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9348,7 +9215,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9385,7 +9252,6 @@ No authorization required ```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. @@ -9419,10 +9285,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9471,7 +9337,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9479,7 +9345,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9516,7 +9382,6 @@ No authorization required ```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. @@ -9550,10 +9415,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9604,7 +9469,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9612,7 +9477,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9649,7 +9514,6 @@ No authorization required ```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. @@ -9683,10 +9547,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9709,7 +9573,7 @@ No authorization required ```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 unit_test_api.model.ref_in_not import RefInNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -9723,7 +9587,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RefInNot(None) try: api_response = api_instance.post_ref_in_not_request_body( body=body, @@ -9735,7 +9599,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9743,18 +9607,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -9778,7 +9635,7 @@ No authorization required # **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() +> RefInNot post_ref_in_not_response_body_for_content_types() @@ -9787,7 +9644,6 @@ No authorization required ```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. @@ -9821,21 +9677,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -9880,7 +9729,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -9888,7 +9737,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9925,7 +9774,6 @@ No authorization required ```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. @@ -9959,10 +9807,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -10011,7 +9859,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10019,7 +9867,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -10056,7 +9904,6 @@ No authorization required ```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. @@ -10090,10 +9937,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -10142,7 +9989,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10150,7 +9997,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10187,7 +10034,6 @@ No authorization required ```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. @@ -10221,10 +10067,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10273,7 +10119,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10281,7 +10127,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10318,7 +10164,6 @@ No authorization required ```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. @@ -10352,10 +10197,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10404,7 +10249,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10412,7 +10257,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10449,7 +10294,6 @@ No authorization required ```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. @@ -10483,10 +10327,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10509,6 +10353,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -10522,7 +10367,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RequiredWithEscapedCharacters(None) try: api_response = api_instance.post_required_with_escaped_characters_request_body( body=body, @@ -10534,7 +10379,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10542,12 +10387,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -10571,7 +10415,7 @@ No authorization required # **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() +> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() @@ -10613,15 +10457,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -10666,7 +10509,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10674,7 +10517,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10711,7 +10554,6 @@ No authorization required ```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. @@ -10745,10 +10587,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10771,6 +10613,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -10784,7 +10627,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = "body_example" + body = StringTypeMatchesStrings("body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -10796,7 +10639,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10804,12 +10647,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Return Types, Responses @@ -10833,7 +10675,7 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> str post_string_type_matches_strings_response_body_for_content_types() +> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() @@ -10875,15 +10717,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Authorization @@ -10930,7 +10771,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -10938,7 +10779,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10975,7 +10816,6 @@ No authorization required ```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. @@ -11009,10 +10849,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -11061,7 +10901,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11069,7 +10909,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -11106,7 +10946,6 @@ No authorization required ```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. @@ -11140,10 +10979,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -11192,7 +11031,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11200,7 +11039,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11237,7 +11076,6 @@ No authorization required ```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. @@ -11271,10 +11109,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11297,6 +11135,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.uri_format import UriFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -11310,7 +11149,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriFormat(None) try: api_response = api_instance.post_uri_format_request_body( body=body, @@ -11322,7 +11161,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11330,12 +11169,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -11359,7 +11197,7 @@ No authorization required # **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() +> UriFormat post_uri_format_response_body_for_content_types() @@ -11401,15 +11239,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -11428,6 +11265,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.uri_reference_format import UriReferenceFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -11441,7 +11279,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriReferenceFormat(None) try: api_response = api_instance.post_uri_reference_format_request_body( body=body, @@ -11453,7 +11291,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11461,12 +11299,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -11490,7 +11327,7 @@ No authorization required # **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() +> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() @@ -11532,15 +11369,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -11559,6 +11395,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import path_post_api +from unit_test_api.model.uri_template_format import UriTemplateFormat from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -11572,7 +11409,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = path_post_api.PathPostApi(api_client) # example passing only required values which don't have defaults set - body = None + body = UriTemplateFormat(None) try: api_response = api_instance.post_uri_template_format_request_body( body=body, @@ -11584,7 +11421,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -11592,12 +11429,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 @@ -11621,7 +11457,7 @@ No authorization required # **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() +> UriTemplateFormat post_uri_template_format_response_body_for_content_types() @@ -11663,15 +11499,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 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 index a6cae4de541..c8429c385b8 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -178,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -186,7 +185,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -223,7 +222,6 @@ No authorization required ```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. @@ -257,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.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 index 67c74c2c13f..d69d8fcf34e 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -178,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -186,7 +185,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -223,7 +222,6 @@ No authorization required ```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. @@ -257,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.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 index 520d9c32307..7ab575688e1 100644 --- 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 @@ -59,7 +59,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -67,7 +67,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -104,7 +104,6 @@ No authorization required ```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. @@ -138,10 +137,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -192,7 +191,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -200,7 +199,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -237,7 +236,6 @@ No authorization required ```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. @@ -271,10 +269,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -323,7 +321,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -331,7 +329,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -368,7 +366,6 @@ No authorization required ```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. @@ -402,10 +399,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -454,7 +451,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -462,7 +459,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -499,7 +496,6 @@ No authorization required ```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. @@ -533,10 +529,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -587,7 +583,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -595,7 +591,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -632,7 +628,6 @@ No authorization required ```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. @@ -666,10 +661,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -692,7 +687,7 @@ No authorization required ```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 unit_test_api.model.ref_in_not import RefInNot from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -706,7 +701,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = ref_api.RefApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RefInNot(None) try: api_response = api_instance.post_ref_in_not_request_body( body=body, @@ -718,7 +713,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -726,18 +721,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -761,7 +749,7 @@ No authorization required # **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() +> RefInNot post_ref_in_not_response_body_for_content_types() @@ -770,7 +758,6 @@ No authorization required ```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. @@ -804,21 +791,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -863,7 +843,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -871,7 +851,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -908,7 +888,6 @@ No authorization required ```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. @@ -942,10 +921,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -994,7 +973,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1002,7 +981,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -1039,7 +1018,6 @@ No authorization required ```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. @@ -1073,10 +1051,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.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 index 7ed6e02f04e..6fe86d35ce4 100644 --- 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 @@ -51,7 +51,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -59,7 +59,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -96,7 +96,6 @@ No authorization required ```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. @@ -130,10 +129,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -182,7 +181,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -190,7 +189,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -227,7 +226,6 @@ No authorization required ```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. @@ -261,10 +259,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -313,7 +311,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -321,7 +319,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -358,7 +356,6 @@ No authorization required ```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. @@ -392,10 +389,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -418,6 +415,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import required_api +from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -431,7 +429,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = required_api.RequiredApi(api_client) # example passing only required values which don't have defaults set - body = None + body = RequiredWithEscapedCharacters(None) try: api_response = api_instance.post_required_with_escaped_characters_request_body( body=body, @@ -443,7 +441,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -451,12 +449,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -480,7 +477,7 @@ No authorization required # **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() +> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() @@ -522,15 +519,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 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 index 0147f02e5f6..844561c3b32 100644 --- 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 @@ -104,7 +104,6 @@ Method | HTTP request | Description ```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. @@ -138,10 +137,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -164,7 +163,6 @@ No authorization required ```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. @@ -198,10 +196,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -224,7 +222,6 @@ No authorization required ```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. @@ -258,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -284,7 +281,6 @@ No authorization required ```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. @@ -318,10 +314,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -344,7 +340,6 @@ No authorization required ```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. @@ -378,10 +373,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -404,7 +399,6 @@ No authorization required ```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. @@ -438,10 +432,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -464,7 +458,6 @@ No authorization required ```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. @@ -498,10 +491,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -524,7 +517,6 @@ No authorization required ```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. @@ -558,10 +550,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -584,7 +576,6 @@ No authorization required ```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. @@ -618,10 +609,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -644,7 +635,6 @@ No authorization required ```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. @@ -678,10 +668,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -704,7 +694,6 @@ No authorization required ```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. @@ -738,10 +727,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -764,7 +753,6 @@ No authorization required ```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. @@ -798,10 +786,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -824,7 +812,6 @@ No authorization required ```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. @@ -858,10 +845,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -884,7 +871,6 @@ No authorization required ```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. @@ -918,10 +904,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -944,7 +930,6 @@ No authorization required ```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. @@ -978,10 +963,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -1004,7 +989,6 @@ No authorization required ```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. @@ -1038,10 +1022,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -1064,7 +1048,6 @@ No authorization required ```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. @@ -1098,10 +1081,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -1115,7 +1098,7 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> bool post_boolean_type_matches_booleans_response_body_for_content_types() +> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() @@ -1157,15 +1140,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Authorization @@ -1184,7 +1166,6 @@ No authorization required ```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. @@ -1218,10 +1199,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -1244,7 +1225,6 @@ No authorization required ```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. @@ -1278,10 +1258,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -1304,7 +1284,6 @@ No authorization required ```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. @@ -1338,10 +1317,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -1355,7 +1334,7 @@ No authorization required # **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() +> DateTimeFormat post_date_time_format_response_body_for_content_types() @@ -1397,15 +1376,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**DateTimeFormat**](../../models/DateTimeFormat.md) | | -## 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 @@ -1415,7 +1393,7 @@ No authorization required # **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() +> EmailFormat post_email_format_response_body_for_content_types() @@ -1457,15 +1435,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**EmailFormat**](../../models/EmailFormat.md) | | -## 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 @@ -1484,7 +1461,6 @@ No authorization required ```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. @@ -1518,10 +1494,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -1544,7 +1520,6 @@ No authorization required ```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. @@ -1578,10 +1553,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -1604,7 +1579,6 @@ No authorization required ```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. @@ -1638,10 +1612,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -1664,7 +1638,6 @@ No authorization required ```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. @@ -1698,10 +1671,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -1724,7 +1697,6 @@ No authorization required ```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. @@ -1758,10 +1730,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -1784,7 +1756,6 @@ No authorization required ```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. @@ -1818,10 +1789,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -1844,7 +1815,6 @@ No authorization required ```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. @@ -1878,10 +1848,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -1895,7 +1865,7 @@ No authorization required # **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() +> HostnameFormat post_hostname_format_response_body_for_content_types() @@ -1937,15 +1907,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**HostnameFormat**](../../models/HostnameFormat.md) | | -## 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 @@ -1955,7 +1924,7 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> int post_integer_type_matches_integers_response_body_for_content_types() +> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() @@ -1997,15 +1966,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -2024,7 +1992,6 @@ No authorization required ```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. @@ -2058,10 +2025,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -2084,7 +2051,6 @@ No authorization required ```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. @@ -2118,10 +2084,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -2135,7 +2101,7 @@ No authorization required # **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() +> Ipv4Format post_ipv4_format_response_body_for_content_types() @@ -2177,15 +2143,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv4Format**](../../models/Ipv4Format.md) | | -## 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 @@ -2195,7 +2160,7 @@ No authorization required # **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() +> Ipv6Format post_ipv6_format_response_body_for_content_types() @@ -2237,15 +2202,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Ipv6Format**](../../models/Ipv6Format.md) | | -## 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 @@ -2255,7 +2219,7 @@ No authorization required # **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() +> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() @@ -2297,15 +2261,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | -## 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 @@ -2324,7 +2287,6 @@ No authorization required ```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. @@ -2358,10 +2320,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -2384,7 +2346,6 @@ No authorization required ```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. @@ -2418,10 +2379,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -2444,7 +2405,6 @@ No authorization required ```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. @@ -2478,10 +2438,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -2504,7 +2464,6 @@ No authorization required ```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. @@ -2538,10 +2497,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -2564,7 +2523,6 @@ No authorization required ```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. @@ -2598,10 +2556,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -2624,7 +2582,6 @@ No authorization required ```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. @@ -2658,10 +2615,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -2684,7 +2641,6 @@ No authorization required ```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. @@ -2718,10 +2674,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -2744,7 +2700,6 @@ No authorization required ```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. @@ -2778,10 +2733,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -2804,7 +2759,6 @@ No authorization required ```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. @@ -2838,10 +2792,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -2864,7 +2818,6 @@ No authorization required ```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. @@ -2898,10 +2851,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -2924,7 +2877,6 @@ No authorization required ```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. @@ -2958,10 +2910,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -2984,7 +2936,6 @@ No authorization required ```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. @@ -3018,10 +2969,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -3044,7 +2995,6 @@ No authorization required ```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. @@ -3078,10 +3028,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -3104,7 +3054,6 @@ No authorization required ```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. @@ -3138,10 +3087,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -3164,7 +3113,6 @@ No authorization required ```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. @@ -3198,10 +3146,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -3215,7 +3163,7 @@ No authorization required # **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() +> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() @@ -3257,34 +3205,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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, | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | -### 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 @@ -3294,7 +3222,7 @@ No authorization required # **post_not_response_body_for_content_types** -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() +> ModelNot post_not_response_body_for_content_types() @@ -3336,28 +3264,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ModelNot**](../../models/ModelNot.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -3376,7 +3290,6 @@ No authorization required ```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. @@ -3410,10 +3323,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -3427,7 +3340,7 @@ No authorization required # **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() +> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() @@ -3469,15 +3382,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Authorization @@ -3487,7 +3399,7 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> int, float post_number_type_matches_numbers_response_body_for_content_types() +> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() @@ -3529,15 +3441,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Authorization @@ -3556,7 +3467,6 @@ No authorization required ```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. @@ -3590,10 +3500,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -3607,7 +3517,7 @@ No authorization required # **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() +> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() @@ -3649,15 +3559,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Authorization @@ -3676,7 +3585,6 @@ No authorization required ```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. @@ -3710,10 +3618,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -3736,7 +3644,6 @@ No authorization required ```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. @@ -3770,10 +3677,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -3796,7 +3703,6 @@ No authorization required ```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. @@ -3830,10 +3736,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -3856,7 +3762,6 @@ No authorization required ```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. @@ -3890,10 +3795,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -3916,7 +3821,6 @@ No authorization required ```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. @@ -3950,10 +3854,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -3976,7 +3880,6 @@ No authorization required ```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. @@ -4010,10 +3913,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -4036,7 +3939,6 @@ No authorization required ```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. @@ -4070,10 +3972,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -4096,7 +3998,6 @@ No authorization required ```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. @@ -4130,10 +4031,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -4156,7 +4057,6 @@ No authorization required ```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. @@ -4190,10 +4090,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -4216,7 +4116,6 @@ No authorization required ```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. @@ -4250,10 +4149,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -4276,7 +4175,6 @@ No authorization required ```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. @@ -4310,10 +4208,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -4336,7 +4234,6 @@ No authorization required ```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. @@ -4370,10 +4267,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -4396,7 +4293,6 @@ No authorization required ```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. @@ -4430,10 +4326,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -4447,7 +4343,7 @@ No authorization required # **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() +> RefInNot post_ref_in_not_response_body_for_content_types() @@ -4456,7 +4352,6 @@ No authorization required ```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. @@ -4490,21 +4385,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | 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 | | +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInNot**](../../models/RefInNot.md) | | -### 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 @@ -4523,7 +4411,6 @@ No authorization required ```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. @@ -4557,10 +4444,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -4583,7 +4470,6 @@ No authorization required ```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. @@ -4617,10 +4503,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -4643,7 +4529,6 @@ No authorization required ```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. @@ -4677,10 +4562,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -4703,7 +4588,6 @@ No authorization required ```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. @@ -4737,10 +4621,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -4763,7 +4647,6 @@ No authorization required ```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. @@ -4797,10 +4680,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -4814,7 +4697,7 @@ No authorization required # **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() +> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() @@ -4856,15 +4739,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | -## 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 @@ -4883,7 +4765,6 @@ No authorization required ```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. @@ -4917,10 +4798,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -4934,7 +4815,7 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> str post_string_type_matches_strings_response_body_for_content_types() +> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() @@ -4976,15 +4857,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Authorization @@ -5003,7 +4883,6 @@ No authorization required ```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. @@ -5037,10 +4916,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -5063,7 +4942,6 @@ No authorization required ```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. @@ -5097,10 +4975,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -5123,7 +5001,6 @@ No authorization required ```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. @@ -5157,10 +5034,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -5174,7 +5051,7 @@ No authorization required # **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() +> UriFormat post_uri_format_response_body_for_content_types() @@ -5216,15 +5093,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriFormat**](../../models/UriFormat.md) | | -## 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 @@ -5234,7 +5110,7 @@ No authorization required # **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() +> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() @@ -5276,15 +5152,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | -## 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 @@ -5294,7 +5169,7 @@ No authorization required # **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() +> UriTemplateFormat post_uri_template_format_response_body_for_content_types() @@ -5336,15 +5211,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | -## 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 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 index f3f2d1bebda..befa17493b3 100644 --- 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 @@ -59,7 +59,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -67,7 +67,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -104,7 +104,6 @@ No authorization required ```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. @@ -138,10 +137,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -164,6 +163,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import type_api +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -177,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = type_api.TypeApi(api_client) # example passing only required values which don't have defaults set - body = True + body = BooleanTypeMatchesBooleans(True) try: api_response = api_instance.post_boolean_type_matches_booleans_request_body( body=body, @@ -189,7 +189,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -197,12 +197,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Return Types, Responses @@ -226,7 +225,7 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> bool post_boolean_type_matches_booleans_response_body_for_content_types() +> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() @@ -268,15 +267,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Authorization @@ -295,6 +293,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import type_api +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -308,7 +307,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = type_api.TypeApi(api_client) # example passing only required values which don't have defaults set - body = 1 + body = IntegerTypeMatchesIntegers(1) try: api_response = api_instance.post_integer_type_matches_integers_request_body( body=body, @@ -320,7 +319,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -328,12 +327,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses @@ -357,7 +355,7 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> int post_integer_type_matches_integers_response_body_for_content_types() +> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() @@ -399,15 +397,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -426,6 +423,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import type_api +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -439,7 +437,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = type_api.TypeApi(api_client) # example passing only required values which don't have defaults set - body = None + body = NullTypeMatchesOnlyTheNullObject(None) try: api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( body=body, @@ -451,7 +449,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -459,12 +457,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Return Types, Responses @@ -488,7 +485,7 @@ No authorization required # **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() +> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() @@ -530,15 +527,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | ### Authorization @@ -557,6 +553,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import type_api +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -570,7 +567,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = type_api.TypeApi(api_client) # example passing only required values which don't have defaults set - body = 3.14 + body = NumberTypeMatchesNumbers(3.14) try: api_response = api_instance.post_number_type_matches_numbers_request_body( body=body, @@ -582,7 +579,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -590,12 +587,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Return Types, Responses @@ -619,7 +615,7 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> int, float post_number_type_matches_numbers_response_body_for_content_types() +> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() @@ -661,15 +657,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | ### Authorization @@ -688,6 +683,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import type_api +from unit_test_api.model.object_type_matches_objects import ObjectTypeMatchesObjects from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -701,7 +697,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = type_api.TypeApi(api_client) # example passing only required values which don't have defaults set - body = dict() + body = ObjectTypeMatchesObjects() try: api_response = api_instance.post_object_type_matches_objects_request_body( body=body, @@ -713,7 +709,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -721,12 +717,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Return Types, Responses @@ -750,7 +745,7 @@ No authorization required # **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() +> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() @@ -792,15 +787,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | ### Authorization @@ -819,6 +813,7 @@ No authorization required ```python import unit_test_api from unit_test_api.apis.tags import type_api +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -832,7 +827,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = type_api.TypeApi(api_client) # example passing only required values which don't have defaults set - body = "body_example" + body = StringTypeMatchesStrings("body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -844,7 +839,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -852,12 +847,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Return Types, Responses @@ -881,7 +875,7 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> str post_string_type_matches_strings_response_body_for_content_types() +> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() @@ -923,15 +917,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Authorization 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 index 529b69479c7..a6efda37b07 100644 --- 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 @@ -47,7 +47,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -55,7 +55,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -92,7 +92,6 @@ No authorization required ```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. @@ -126,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -178,7 +177,7 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -186,7 +185,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -223,7 +222,6 @@ No authorization required ```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. @@ -257,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectTypeMatchesObjects.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectTypeMatchesObjects.md new file mode 100644 index 00000000000..7ef7e50f16f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectTypeMatchesObjects.md @@ -0,0 +1,9 @@ +# unit_test_api.model.object_type_matches_objects.ObjectTypeMatchesObjects + +## 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/3_0_3_unit_test/python/test/test_models/test_object_type_matches_objects.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_type_matches_objects.py new file mode 100644 index 00000000000..2a33d925794 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_type_matches_objects.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, 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_type_matches_objects import ObjectTypeMatchesObjects +from unit_test_api import configuration + + +class TestObjectTypeMatchesObjects(unittest.TestCase): + """ObjectTypeMatchesObjects unit test stubs""" + _configuration = configuration.Configuration() + + def test_a_float_is_not_an_object_fails(self): + # a float is not an object + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + ObjectTypeMatchesObjects.from_openapi_data_oapg( + 1.1, + _configuration=self._configuration + ) + + def test_null_is_not_an_object_fails(self): + # null is not an object + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + ObjectTypeMatchesObjects.from_openapi_data_oapg( + None, + _configuration=self._configuration + ) + + def test_an_array_is_not_an_object_fails(self): + # an array is not an object + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + ObjectTypeMatchesObjects.from_openapi_data_oapg( + [ + ], + _configuration=self._configuration + ) + + def test_an_object_is_an_object_passes(self): + # an object is an object + ObjectTypeMatchesObjects.from_openapi_data_oapg( + { + }, + _configuration=self._configuration + ) + + def test_a_string_is_not_an_object_fails(self): + # a string is not an object + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + ObjectTypeMatchesObjects.from_openapi_data_oapg( + "foo", + _configuration=self._configuration + ) + + def test_an_integer_is_not_an_object_fails(self): + # an integer is not an object + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + ObjectTypeMatchesObjects.from_openapi_data_oapg( + 1, + _configuration=self._configuration + ) + + def test_a_boolean_is_not_an_object_fails(self): + # a boolean is not an object + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + ObjectTypeMatchesObjects.from_openapi_data_oapg( + True, + _configuration=self._configuration + ) + + +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_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 index 1ec438f9e0b..ad74ec903f7 100644 --- 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 @@ -44,7 +44,7 @@ def test_no_additional_properties_is_valid_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -82,7 +82,7 @@ def test_an_additional_invalid_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_an_additional_valid_property_is_valid_passes(self): True, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 51206546a3e..7189fc2fe0c 100644 --- 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 @@ -48,7 +48,7 @@ def test_additional_properties_are_allowed_passes(self): True, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 6ef684d7aaa..ac53aabc5ac 100644 --- 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 @@ -45,7 +45,7 @@ def test_an_additional_invalid_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -61,7 +61,7 @@ def test_an_additional_valid_property_is_valid_passes(self): True, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b8eadc2525f..e38f12a3739 100644 --- 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 @@ -47,7 +47,7 @@ def test_properties_defined_in_allof_are_not_examined_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -65,7 +65,7 @@ def test_valid_test_case_passes(self): True, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d1c7dc21251..dc3ce0eaa17 100644 --- 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 @@ -42,7 +42,7 @@ def test_allof_true_anyof_false_oneof_false_fails(self): 2 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_allof_false_anyof_false_oneof_true_fails(self): 5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -70,7 +70,7 @@ def test_allof_false_anyof_true_oneof_true_fails(self): 15 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_allof_true_anyof_true_oneof_false_fails(self): 6 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -97,7 +97,7 @@ def test_allof_true_anyof_true_oneof_true_passes(self): payload = ( 30 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -128,7 +128,7 @@ def test_allof_true_anyof_false_oneof_true_fails(self): 10 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -142,7 +142,7 @@ def test_allof_false_anyof_true_oneof_false_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -156,7 +156,7 @@ def test_allof_false_anyof_false_oneof_false_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b5b226da396..470f2b91d12 100644 --- 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 @@ -46,7 +46,7 @@ def test_allof_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -80,7 +80,7 @@ def test_mismatch_first_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -97,7 +97,7 @@ def test_mismatch_second_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,7 +116,7 @@ def test_wrong_type_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 9bc320bd602..d3e5d6942d1 100644 --- 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 @@ -41,7 +41,7 @@ def test_valid_passes(self): payload = ( 25 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_mismatch_one_fails(self): 35 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b9cbf295229..bd973cba638 100644 --- 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 @@ -48,7 +48,7 @@ def test_valid_passes(self): None, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_mismatch_first_allof_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -103,7 +103,7 @@ def test_mismatch_base_schema_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -120,7 +120,7 @@ def test_mismatch_both_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -139,7 +139,7 @@ def test_mismatch_second_allof_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 908bd1ca7ba..5bd16a4a057 100644 --- 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 @@ -41,7 +41,7 @@ def test_any_data_is_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 72bd0bed2be..90e74923916 100644 --- 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 @@ -42,7 +42,7 @@ def test_string_is_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_number_is_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 46ab77081dc..f68dc101f6e 100644 --- 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 @@ -42,7 +42,7 @@ def test_string_is_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_number_is_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7457f418182..131a0c613d8 100644 --- 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 @@ -41,7 +41,7 @@ def test_any_data_is_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2cd85be49f7..259be224575 100644 --- 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 @@ -44,7 +44,7 @@ def test_second_anyof_valid_complex_passes(self): "baz", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -80,7 +80,7 @@ def test_neither_anyof_valid_complex_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -98,7 +98,7 @@ def test_both_anyof_valid_complex_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -131,7 +131,7 @@ def test_first_anyof_valid_complex_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 8405d6e3181..77955591754 100644 --- 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 @@ -41,7 +41,7 @@ def test_second_anyof_valid_passes(self): payload = ( 2.5 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_neither_anyof_valid_fails(self): 1.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_both_anyof_valid_passes(self): payload = ( 3 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_first_anyof_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7db203a0e1c..24c03599c1a 100644 --- 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 @@ -41,7 +41,7 @@ def test_one_anyof_valid_passes(self): payload = ( "foobar" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_both_anyof_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,7 +86,7 @@ def test_mismatch_base_schema_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 15e0575d87b..ba35a8aa949 100644 --- 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 @@ -41,7 +41,7 @@ def test_string_is_valid_passes(self): payload = ( "foo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_number_is_valid_passes(self): payload = ( 123 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 6132d9c26bd..f78a6aa0fd7 100644 --- 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 @@ -42,7 +42,7 @@ def test_a_float_is_not_an_array_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_a_boolean_is_not_an_array_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -70,7 +70,7 @@ def test_null_is_not_an_array_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_an_object_is_not_an_array_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -99,7 +99,7 @@ def test_a_string_is_not_an_array_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -113,7 +113,7 @@ def test_an_array_is_an_array_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -144,7 +144,7 @@ def test_an_integer_is_not_an_array_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3755adac412..56f4ba8aeaf 100644 --- 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 @@ -42,7 +42,7 @@ def test_an_empty_string_is_not_a_boolean_fails(self): "" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_a_float_is_not_a_boolean_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -70,7 +70,7 @@ def test_null_is_not_a_boolean_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_zero_is_not_a_boolean_fails(self): 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -99,7 +99,7 @@ def test_an_array_is_not_a_boolean_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -113,7 +113,7 @@ def test_a_string_is_not_a_boolean_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -126,7 +126,7 @@ def test_false_is_a_boolean_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -157,7 +157,7 @@ def test_an_integer_is_not_a_boolean_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -170,7 +170,7 @@ def test_true_is_a_boolean_passes(self): payload = ( True ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -202,7 +202,7 @@ def test_an_object_is_not_a_boolean_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 6792b353533..08dd4ff8f6e 100644 --- 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 @@ -42,7 +42,7 @@ def test_int_by_int_fail_fails(self): 7 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_int_by_int_passes(self): payload = ( 10 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_ignores_non_numbers_passes(self): payload = ( "foo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 71cf3827359..0d85ce6a66c 100644 --- 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 @@ -41,7 +41,7 @@ def test_45_is_multiple_of15_passes(self): payload = ( 4.5 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_35_is_not_multiple_of15_fails(self): 35 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_zero_is_multiple_of_anything_passes(self): payload = ( 0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f16340e5b9b..c1dd83bc858 100644 --- 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 @@ -42,7 +42,7 @@ def test_000751_is_not_multiple_of00001_fails(self): 0.00751 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_00075_is_multiple_of00001_passes(self): payload = ( 0.0075 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 51f2f2fd429..9fcaa87edb3 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 4d1a472e3b4..7879248ff5f 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c58a7e635a9..c6cad639b0a 100644 --- 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 @@ -41,7 +41,7 @@ def test_integer_zero_is_valid_passes(self): payload = ( 0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_float_zero_is_valid_passes(self): payload = ( 0.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_false_is_invalid_fails(self): False ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 837485e2b97..e6ad4a0b7ad 100644 --- 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 @@ -42,7 +42,7 @@ def test_true_is_invalid_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_integer_one_is_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_float_one_is_valid_passes(self): payload = ( 1.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2aaa5a405ec..ec1d32c744a 100644 --- 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 @@ -41,7 +41,7 @@ def test_member2_is_valid_passes(self): payload = ( "foo\rbar" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_member1_is_valid_passes(self): payload = ( "foo\nbar" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_another_string_is_invalid_fails(self): "abc" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f68456be55e..0193bd9d8ec 100644 --- 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 @@ -41,7 +41,7 @@ def test_false_is_valid_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_float_zero_is_invalid_fails(self): 0.0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,7 +86,7 @@ def test_integer_zero_is_invalid_fails(self): 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 36fc116919a..cfbde927ae4 100644 --- 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 @@ -42,7 +42,7 @@ def test_float_one_is_invalid_fails(self): 1.0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_true_is_valid_passes(self): payload = ( True ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,7 +86,7 @@ def test_integer_one_is_invalid_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 9244bfd1824..9bd9743a411 100644 --- 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 @@ -44,7 +44,7 @@ def test_missing_optional_property_is_valid_passes(self): "bar", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -80,7 +80,7 @@ def test_wrong_foo_value_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -98,7 +98,7 @@ def test_both_properties_are_valid_passes(self): "bar", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -134,7 +134,7 @@ def test_wrong_bar_value_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -149,7 +149,7 @@ def test_missing_all_properties_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -166,7 +166,7 @@ def test_missing_required_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 38f04c4f878..96607673062 100644 --- 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 @@ -47,7 +47,7 @@ def test_property_present_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -65,7 +65,7 @@ def test_property_absent_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b626fef6e2b..0e06dcab928 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d30a2776da4..5425cbed897 100644 --- 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 @@ -43,7 +43,7 @@ def test_an_object_is_not_an_integer_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -57,7 +57,7 @@ def test_a_string_is_not_an_integer_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_null_is_not_an_integer_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): payload = ( 1.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_a_float_is_not_an_integer_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -129,7 +129,7 @@ def test_a_boolean_is_not_an_integer_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -142,7 +142,7 @@ def test_an_integer_is_an_integer_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -173,7 +173,7 @@ def test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails(self): "1" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -188,7 +188,7 @@ def test_an_array_is_not_an_integer_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c2ff2adebed..fb51c877c43 100644 --- 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 @@ -42,7 +42,7 @@ def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fa 1.0E308 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_valid_integer_with_multipleof_float_passes(self): payload = ( 123456789 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index e3d1edeeee4..8919018b2cb 100644 --- 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 @@ -44,7 +44,7 @@ def test_valid_when_property_is_specified_passes(self): "good", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -75,7 +75,7 @@ def test_still_valid_when_the_invalid_default_is_used_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 0c7408ba02f..a907801620c 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 19214ebb3ae..70fc9423063 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ae8f171dd60..098cce34873 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d16fe2926be..3f5537eb1cd 100644 --- 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 @@ -41,7 +41,7 @@ def test_below_the_maximum_is_valid_passes(self): payload = ( 2.6 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_boundary_point_is_valid_passes(self): payload = ( 3.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_above_the_maximum_is_invalid_fails(self): 3.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_ignores_non_numbers_passes(self): payload = ( "x" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index e26b9b2dae7..00a704b49bd 100644 --- 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 @@ -41,7 +41,7 @@ def test_below_the_maximum_is_invalid_passes(self): payload = ( 299.97 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_above_the_maximum_is_invalid_fails(self): 300.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_boundary_point_integer_is_valid_passes(self): payload = ( 300 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_boundary_point_float_is_valid_passes(self): payload = ( 300.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index de8c99ca795..83efc6dca0b 100644 --- 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 @@ -46,7 +46,7 @@ def test_too_long_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -59,7 +59,7 @@ def test_ignores_non_arrays_passes(self): payload = ( "foobar" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -91,7 +91,7 @@ def test_shorter_is_valid_passes(self): 1, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -124,7 +124,7 @@ def test_exact_length_is_valid_passes(self): 2, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 8443176e95f..5f35a76dffd 100644 --- 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 @@ -42,7 +42,7 @@ def test_too_long_is_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_ignores_non_strings_passes(self): payload = ( 100 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_shorter_is_valid_passes(self): payload = ( "f" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): payload = ( "💩💩" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -145,7 +145,7 @@ def test_exact_length_is_valid_passes(self): payload = ( "fo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 53c93f5ba26..f975c25ed07 100644 --- 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 @@ -42,7 +42,7 @@ def test_no_properties_is_valid_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -76,7 +76,7 @@ def test_one_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 75849461f66..6dbcd8d21a2 100644 --- 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 @@ -49,7 +49,7 @@ def test_too_long_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -66,7 +66,7 @@ def test_ignores_arrays_passes(self): 3, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -96,7 +96,7 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -126,7 +126,7 @@ def test_ignores_strings_passes(self): payload = ( "foobar" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -159,7 +159,7 @@ def test_shorter_is_valid_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -194,7 +194,7 @@ def test_exact_length_is_valid_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b637e0e80af..4a38f9ac343 100644 --- 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 @@ -41,7 +41,7 @@ def test_boundary_point_is_valid_passes(self): payload = ( 1.1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_below_the_minimum_is_invalid_fails(self): 0.6 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_above_the_minimum_is_valid_passes(self): payload = ( 2.6 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_ignores_non_numbers_passes(self): payload = ( "x" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 37dab1a048d..1c0c51cb3ea 100644 --- 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 @@ -41,7 +41,7 @@ def test_boundary_point_is_valid_passes(self): payload = ( -2 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_positive_above_the_minimum_is_valid_passes(self): payload = ( 0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_int_below_the_minimum_is_invalid_fails(self): -3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,7 +116,7 @@ def test_float_below_the_minimum_is_invalid_fails(self): -2.0001 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -129,7 +129,7 @@ def test_boundary_point_with_float_is_valid_passes(self): payload = ( -2.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -159,7 +159,7 @@ def test_negative_above_the_minimum_is_valid_passes(self): payload = ( -1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -189,7 +189,7 @@ def test_ignores_non_numbers_passes(self): payload = ( "x" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index af54b84112b..7588cfe89d6 100644 --- 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 @@ -43,7 +43,7 @@ def test_too_short_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_ignores_non_arrays_passes(self): payload = ( "" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -89,7 +89,7 @@ def test_longer_is_valid_passes(self): 2, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -121,7 +121,7 @@ def test_exact_length_is_valid_passes(self): 1, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 1a1db934bba..079e2d765de 100644 --- 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 @@ -42,7 +42,7 @@ def test_too_short_is_invalid_fails(self): "f" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_one_supplementary_unicode_code_point_is_not_long_enough_fails(self): "💩" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -69,7 +69,7 @@ def test_longer_is_valid_passes(self): payload = ( "foo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -99,7 +99,7 @@ def test_ignores_non_strings_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -129,7 +129,7 @@ def test_exact_length_is_valid_passes(self): payload = ( "fo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 91341e06d74..3781d2032c8 100644 --- 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 @@ -42,7 +42,7 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -104,7 +104,7 @@ def test_too_short_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,7 +117,7 @@ def test_ignores_strings_passes(self): payload = ( "" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -152,7 +152,7 @@ def test_longer_is_valid_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -185,7 +185,7 @@ def test_exact_length_is_valid_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 73e992a05f2..e68773d6a24 100644 --- 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 @@ -42,7 +42,7 @@ def test_anything_non_null_is_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_null_is_valid_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7951e3c8e8c..ff0db76919e 100644 --- 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 @@ -42,7 +42,7 @@ def test_anything_non_null_is_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_null_is_valid_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 60874a6b8ae..8be3d9cc4a6 100644 --- 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 @@ -70,7 +70,7 @@ def test_valid_nested_array_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -130,7 +130,7 @@ def test_nested_array_with_invalid_type_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -167,7 +167,7 @@ def test_not_deep_enough_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 42a97ddac7b..669faf36fb3 100644 --- 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 @@ -42,7 +42,7 @@ def test_anything_non_null_is_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_null_is_valid_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index eaacac00ebb..8585b91a525 100644 --- 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 @@ -44,7 +44,7 @@ def test_other_match_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -78,7 +78,7 @@ def test_mismatch_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -91,7 +91,7 @@ def test_match_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c9bd6f3f304..e502a02e359 100644 --- 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 @@ -41,7 +41,7 @@ def test_allowed_passes(self): payload = ( "foo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_disallowed_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 0586243d617..018514f2bbe 100644 --- 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 @@ -41,7 +41,7 @@ def test_match_string_with_nul_passes(self): payload = ( "hello\x00there" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_do_not_match_string_lacking_nul_fails(self): "hellothere" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f75a20619fa..1786fb06066 100644 --- 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 @@ -42,7 +42,7 @@ def test_a_float_is_not_null_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -57,7 +57,7 @@ def test_an_object_is_not_null_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_false_is_not_null_fails(self): False ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_an_integer_is_not_null_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -99,7 +99,7 @@ def test_true_is_not_null_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -113,7 +113,7 @@ def test_zero_is_not_null_fails(self): 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -127,7 +127,7 @@ def test_an_empty_string_is_not_null_fails(self): "" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -140,7 +140,7 @@ def test_null_is_null_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -172,7 +172,7 @@ def test_an_array_is_not_null_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -186,7 +186,7 @@ def test_a_string_is_not_null_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 70284734ef6..4a9bf790644 100644 --- 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 @@ -43,7 +43,7 @@ def test_an_array_is_not_a_number_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -57,7 +57,7 @@ def test_null_is_not_a_number_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_an_object_is_not_a_number_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,7 +86,7 @@ def test_a_boolean_is_not_a_number_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -99,7 +99,7 @@ def test_a_float_is_a_number_passes(self): payload = ( 1.1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -130,7 +130,7 @@ def test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails(self): "1" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -144,7 +144,7 @@ def test_a_string_is_not_a_number_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -157,7 +157,7 @@ def test_an_integer_is_a_number_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -187,7 +187,7 @@ def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(sel payload = ( 1.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 67fe785a8e4..08748ca6f2b 100644 --- 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 @@ -42,7 +42,7 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -109,7 +109,7 @@ def test_one_property_invalid_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -127,7 +127,7 @@ def test_both_properties_present_and_valid_is_valid_passes(self): "baz", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -161,7 +161,7 @@ def test_doesn_t_invalidate_other_properties_passes(self): ], } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -199,7 +199,7 @@ def test_both_properties_invalid_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index da5fdf5754b..4a6cc96b8b0 100644 --- 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 @@ -42,7 +42,7 @@ def test_a_float_is_not_an_object_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_null_is_not_an_object_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -71,7 +71,7 @@ def test_an_array_is_not_an_object_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_an_object_is_an_object_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,7 +116,7 @@ def test_a_string_is_not_an_object_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -130,7 +130,7 @@ def test_an_integer_is_not_an_object_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -144,7 +144,7 @@ def test_a_boolean_is_not_an_object_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index a786ebf4eb7..a0a9e390010 100644 --- 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 @@ -44,7 +44,7 @@ def test_first_oneof_valid_complex_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -80,7 +80,7 @@ def test_neither_oneof_valid_complex_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -99,7 +99,7 @@ def test_both_oneof_valid_complex_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -115,7 +115,7 @@ def test_second_oneof_valid_complex_passes(self): "baz", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 1b837331c1f..afb1d278735 100644 --- 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 @@ -41,7 +41,7 @@ def test_second_oneof_valid_passes(self): payload = ( 2.5 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_both_oneof_valid_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_first_oneof_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,7 +116,7 @@ def test_neither_oneof_valid_fails(self): 1.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 57bc715f62d..821ee84b34c 100644 --- 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 @@ -42,7 +42,7 @@ def test_both_oneof_valid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -56,7 +56,7 @@ def test_mismatch_base_schema_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -69,7 +69,7 @@ def test_one_oneof_valid_passes(self): payload = ( "foobar" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 191c9dc3dc2..aada787b71b 100644 --- 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 @@ -42,7 +42,7 @@ def test_both_valid_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_one_valid_valid_passes(self): payload = ( "foo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 6f01d9c6e51..fbb5fdf3d75 100644 --- 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 @@ -49,7 +49,7 @@ def test_both_valid_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -66,7 +66,7 @@ def test_both_invalid_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_first_valid_valid_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -119,7 +119,7 @@ def test_second_valid_valid_passes(self): 3, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 6ec8ce1d92a..53cff0084b6 100644 --- 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 @@ -41,7 +41,7 @@ def test_matches_a_substring_passes(self): payload = ( "xxaayy" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index e788bd9e21c..0964aabd571 100644 --- 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 @@ -42,7 +42,7 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -73,7 +73,7 @@ def test_ignores_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -103,7 +103,7 @@ def test_ignores_null_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -133,7 +133,7 @@ def test_ignores_floats_passes(self): payload = ( 1.0 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -164,7 +164,7 @@ def test_a_non_matching_pattern_is_invalid_fails(self): "abc" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -177,7 +177,7 @@ def test_ignores_booleans_passes(self): payload = ( True ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -207,7 +207,7 @@ def test_a_matching_pattern_is_valid_passes(self): payload = ( "aaa" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -237,7 +237,7 @@ def test_ignores_integers_passes(self): payload = ( 123 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f0ce9cfad28..7cea775bbee 100644 --- 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 @@ -54,7 +54,7 @@ def test_object_with_all_numbers_is_valid_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -98,7 +98,7 @@ def test_object_with_strings_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 486fa4c5ae7..72cfd4ef59a 100644 --- 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 @@ -44,7 +44,7 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -78,7 +78,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index eabe92bd69b..cd677e9cb18 100644 --- 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 @@ -47,7 +47,7 @@ def test_property_named_ref_valid_passes(self): }, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b7aa28e7bd7..b03e5d18691 100644 --- 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 @@ -44,7 +44,7 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -78,7 +78,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 517d2427df6..5b8fb1ed591 100644 --- 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 @@ -44,7 +44,7 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -78,7 +78,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index e32c859fc69..15b78bf86b4 100644 --- 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 @@ -46,7 +46,7 @@ def test_property_named_ref_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -82,7 +82,7 @@ def test_property_named_ref_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2285d7c3b43..bd4c35412f6 100644 --- 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 @@ -44,7 +44,7 @@ def test_property_named_ref_valid_passes(self): 2, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -78,7 +78,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7606a57de91..9212b716292 100644 --- 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 @@ -44,7 +44,7 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -78,7 +78,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7f469264453..5a2f5f62273 100644 --- 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 @@ -47,7 +47,7 @@ def test_property_named_ref_valid_passes(self): }, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -84,7 +84,7 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 17a9e08c7a3..098e021e57a 100644 --- 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 @@ -42,7 +42,7 @@ def test_not_required_by_default_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ab17be30229..4fa39334d1e 100644 --- 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 @@ -42,7 +42,7 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -75,7 +75,7 @@ def test_present_required_property_is_valid_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -105,7 +105,7 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -135,7 +135,7 @@ def test_ignores_strings_passes(self): payload = ( "" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -169,7 +169,7 @@ def test_non_present_required_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3e3491d1821..e9ded363e78 100644 --- 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 @@ -42,7 +42,7 @@ def test_property_not_required_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 607f5368732..719d03bd2b8 100644 --- 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 @@ -47,7 +47,7 @@ def test_object_with_some_properties_missing_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -73,7 +73,7 @@ def test_object_with_all_properties_present_is_valid_passes(self): 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index a6ee338a7e7..4b06cd2642e 100644 --- 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 @@ -42,7 +42,7 @@ def test_something_else_is_invalid_fails(self): 4 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_one_of_the_enum_is_valid_passes(self): payload = ( 1 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 12f1e9bfefc..cdfe47c3cb8 100644 --- 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 @@ -42,7 +42,7 @@ def test_1_is_not_a_string_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -55,7 +55,7 @@ def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): payload = ( "1" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -85,7 +85,7 @@ def test_an_empty_string_is_still_a_string_passes(self): payload = ( "" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,7 +116,7 @@ def test_a_float_is_not_a_string_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -131,7 +131,7 @@ def test_an_object_is_not_a_string_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -146,7 +146,7 @@ def test_an_array_is_not_a_string_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -160,7 +160,7 @@ def test_a_boolean_is_not_a_string_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -174,7 +174,7 @@ def test_null_is_not_a_string_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -187,7 +187,7 @@ def test_a_string_is_a_string_passes(self): payload = ( "foo" ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 56ea79de77d..8072150e5d1 100644 --- 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 @@ -42,7 +42,7 @@ def test_missing_properties_are_not_filled_in_with_the_default_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -75,7 +75,7 @@ def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(se 1, } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -109,7 +109,7 @@ def test_an_explicit_property_value_is_checked_against_maximum_failing_fails(sel } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index affd09c5194..4b64f9b5e68 100644 --- 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 @@ -44,7 +44,7 @@ def test_non_unique_array_of_integers_is_valid_passes(self): 1, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -83,7 +83,7 @@ def test_unique_array_of_objects_is_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -134,7 +134,7 @@ def test_non_unique_array_of_nested_objects_is_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -173,7 +173,7 @@ def test_non_unique_array_of_objects_is_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -206,7 +206,7 @@ def test_1_and_true_are_unique_passes(self): True, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -239,7 +239,7 @@ def test_unique_array_of_integers_is_valid_passes(self): 2, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -276,7 +276,7 @@ def test_non_unique_array_of_arrays_is_valid_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -310,7 +310,7 @@ def test_numbers_are_unique_if_mathematically_unequal_passes(self): 1, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -343,7 +343,7 @@ def test_false_is_not_equal_to_zero_passes(self): False, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -394,7 +394,7 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -427,7 +427,7 @@ def test_0_and_false_are_unique_passes(self): False, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -464,7 +464,7 @@ def test_unique_array_of_arrays_is_valid_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -497,7 +497,7 @@ def test_true_is_not_equal_to_one_passes(self): True, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -538,7 +538,7 @@ def test_non_unique_heterogeneous_types_are_valid_passes(self): 1, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -577,7 +577,7 @@ def test_unique_heterogeneous_types_are_valid_passes(self): 1, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 12d95ae7aef..be7e6cab0a4 100644 --- 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 @@ -50,7 +50,7 @@ def test_unique_array_of_objects_is_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -89,7 +89,7 @@ def test_a_true_and_a1_are_unique_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -131,7 +131,7 @@ def test_non_unique_heterogeneous_types_are_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -157,7 +157,7 @@ def test_nested0_and_false_are_unique_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -196,7 +196,7 @@ def test_a_false_and_a0_are_unique_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -231,7 +231,7 @@ def test_numbers_are_unique_if_mathematically_unequal_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -247,7 +247,7 @@ def test_false_is_not_equal_to_zero_passes(self): False, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -284,7 +284,7 @@ def test_0_and_false_are_unique_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -321,7 +321,7 @@ def test_unique_array_of_arrays_is_valid_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -373,7 +373,7 @@ def test_non_unique_array_of_nested_objects_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -391,7 +391,7 @@ def test_non_unique_array_of_more_than_two_integers_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -407,7 +407,7 @@ def test_true_is_not_equal_to_one_passes(self): True, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -451,7 +451,7 @@ def test_objects_are_non_unique_despite_key_order_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -468,7 +468,7 @@ def test_unique_array_of_strings_is_valid_passes(self): "baz", ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -505,7 +505,7 @@ def test_1_and_true_are_unique_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -548,7 +548,7 @@ def test_different_objects_are_unique_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -581,7 +581,7 @@ def test_unique_array_of_integers_is_valid_passes(self): 2, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -622,7 +622,7 @@ def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -645,7 +645,7 @@ def test_non_unique_array_of_objects_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -679,7 +679,7 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): }, ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -717,7 +717,7 @@ def test_non_unique_array_of_arrays_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -735,7 +735,7 @@ def test_non_unique_array_of_strings_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -761,7 +761,7 @@ def test_nested1_and_true_are_unique_passes(self): ], ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -801,7 +801,7 @@ def test_unique_heterogeneous_types_are_valid_passes(self): "{}", ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -835,7 +835,7 @@ def test_non_unique_array_of_integers_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 94a07cc1f57..f9f2c002947 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 9dfca7bbc66..22574fbab71 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 93544bef168..c3a5d713fc4 100644 --- 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 @@ -42,7 +42,7 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -72,7 +72,7 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -102,7 +102,7 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -132,7 +132,7 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -163,7 +163,7 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -193,7 +193,7 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + body = post.RequestBody.Schemas.application_json.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 4c408162b7c..d82cd2bc5bf 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_no_additional_properties_is_valid_passes(self): # no additional properties is valid @@ -59,8 +60,8 @@ def test_no_additional_properties_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -127,8 +128,8 @@ def test_an_additional_valid_property_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2a8383382a9..e66447ddfc1 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_additional_properties_are_allowed_passes(self): # additional properties are allowed @@ -63,8 +64,8 @@ def test_additional_properties_are_allowed_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index fa6be7937ed..c85a29953d4 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_an_additional_invalid_property_is_invalid_fails(self): # an additional invalid property is invalid @@ -86,8 +87,8 @@ def test_an_additional_valid_property_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 66faadd6a08..1d1416eae79 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_properties_defined_in_allof_are_not_examined_fails(self): # properties defined in allOf are not examined @@ -90,8 +91,8 @@ def test_valid_test_case_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 50707b5fb2b..2390d4d856d 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_allof_true_anyof_false_oneof_false_fails(self): # allOf: true, anyOf: false, oneOf: false @@ -152,8 +153,8 @@ def test_allof_true_anyof_true_oneof_true_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index dae63942115..3b579d9d2fc 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_allof_passes(self): # allOf @@ -61,8 +62,8 @@ def test_allof_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7713cf8e733..d56a695a300 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_valid_passes(self): # valid @@ -56,8 +57,8 @@ def test_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 42142f307ea..520957259d2 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_valid_passes(self): # valid @@ -63,8 +64,8 @@ def test_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 68d704af400..963827ff11d 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_any_data_is_valid_passes(self): # any data is valid @@ -56,8 +57,8 @@ def test_any_data_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 0d11bae4dbb..e3ec9ad5549 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_string_is_invalid_fails(self): # string is invalid @@ -80,8 +81,8 @@ def test_number_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 557fe4b7496..246653d7964 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_string_is_invalid_fails(self): # string is invalid @@ -80,8 +81,8 @@ def test_number_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3e280d443b0..dc46c923e40 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_any_data_is_valid_passes(self): # any data is valid @@ -56,8 +57,8 @@ def test_any_data_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2a40c9b558f..fc65fa4639f 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_second_anyof_valid_complex_passes(self): # second anyOf valid (complex) @@ -59,8 +60,8 @@ def test_second_anyof_valid_complex_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -123,8 +124,8 @@ def test_both_anyof_valid_complex_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -156,8 +157,8 @@ def test_first_anyof_valid_complex_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7707cd74acf..b3281057a86 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_second_anyof_valid_passes(self): # second anyOf valid @@ -56,8 +57,8 @@ def test_second_anyof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_both_anyof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -140,8 +141,8 @@ def test_first_anyof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d8981bb737f..928681c880e 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_one_anyof_valid_passes(self): # one anyOf valid @@ -56,8 +57,8 @@ def test_one_anyof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d8a37341e9b..0024d9d5a4f 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_string_is_valid_passes(self): # string is valid @@ -56,8 +57,8 @@ def test_string_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,8 +87,8 @@ def test_number_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 717a6d1e2d9..7f064a6f4fe 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_a_float_is_not_an_array_fails(self): # a float is not an array @@ -178,8 +179,8 @@ def test_an_array_is_an_array_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f4daf112ba0..4a7415a4256 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_an_empty_string_is_not_a_boolean_fails(self): # an empty string is not a boolean @@ -201,8 +202,8 @@ def test_false_is_a_boolean_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -255,8 +256,8 @@ def test_true_is_a_boolean_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ccb4450d001..728787591c4 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_int_by_int_fail_fails(self): # int by int fail @@ -80,8 +81,8 @@ def test_int_by_int_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_ignores_non_numbers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 553452dd34d..d5c9c6816bf 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_45_is_multiple_of15_passes(self): # 4.5 is multiple of 1.5 @@ -56,8 +57,8 @@ def test_45_is_multiple_of15_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_zero_is_multiple_of_anything_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c8e0af97ede..141ad17631f 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_000751_is_not_multiple_of00001_fails(self): # 0.00751 is not multiple of 0.0001 @@ -80,8 +81,8 @@ def test_00075_is_multiple_of00001_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 813449ce9a1..0f44295bdd6 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 0d82125e127..10b9956c894 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 35e22564157..546ce2b55b2 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_integer_zero_is_valid_passes(self): # integer zero is valid @@ -56,8 +57,8 @@ def test_integer_zero_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,8 +87,8 @@ def test_float_zero_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3ddc9a784b8..f7ed9423e77 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_true_is_invalid_fails(self): # true is invalid @@ -80,8 +81,8 @@ def test_integer_one_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_float_one_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index a775da33fc4..2a85c737678 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_member2_is_valid_passes(self): # member 2 is valid @@ -56,8 +57,8 @@ def test_member2_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,8 +87,8 @@ def test_member1_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 229b64beab5..0a55b5fabf9 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_false_is_valid_passes(self): # false is valid @@ -56,8 +57,8 @@ def test_false_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index abb8635973d..05e2b1ec0d6 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_float_one_is_invalid_fails(self): # float one is invalid @@ -80,8 +81,8 @@ def test_true_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 59f2f9b9acb..37bece9641d 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_missing_optional_property_is_valid_passes(self): # missing optional property is valid @@ -59,8 +60,8 @@ def test_missing_optional_property_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -123,8 +124,8 @@ def test_both_properties_are_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 5610f1bd7aa..91f0f7a5004 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_present_fails(self): # property present @@ -90,8 +91,8 @@ def test_property_absent_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ac74108dd33..430d6a171a4 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c772cd05dc4..d5e897f3443 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_an_object_is_not_an_integer_fails(self): # an object is not an integer @@ -129,8 +130,8 @@ def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -207,8 +208,8 @@ def test_an_integer_is_an_integer_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index a198deb37b7..68bc902e849 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails(self): # always invalid, but naive implementations may raise an overflow error @@ -80,8 +81,8 @@ def test_valid_integer_with_multipleof_float_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3cd375f9db4..fff82ac6a1f 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_valid_when_property_is_specified_passes(self): # valid when property is specified @@ -59,8 +60,8 @@ def test_valid_when_property_is_specified_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -90,8 +91,8 @@ def test_still_valid_when_the_invalid_default_is_used_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 4804e8e5a12..d887cf6a3f2 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b63faab6c47..61527310c40 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 49e2e9df945..ee579763cb4 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 42ccfe7cb15..6332ce3df76 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_below_the_maximum_is_valid_passes(self): # below the maximum is valid @@ -56,8 +57,8 @@ def test_below_the_maximum_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,8 +87,8 @@ def test_boundary_point_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -140,8 +141,8 @@ def test_ignores_non_numbers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 725ca59dd94..a376d13302e 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_below_the_maximum_is_invalid_passes(self): # below the maximum is invalid @@ -56,8 +57,8 @@ def test_below_the_maximum_is_invalid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_boundary_point_integer_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -140,8 +141,8 @@ def test_boundary_point_float_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d297f38843b..b247136e3ab 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_too_long_is_invalid_fails(self): # too long is invalid @@ -84,8 +85,8 @@ def test_ignores_non_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,8 +117,8 @@ def test_shorter_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -149,8 +150,8 @@ def test_exact_length_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 7f5622b34b5..6432226a98b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_too_long_is_invalid_fails(self): # too long is invalid @@ -80,8 +81,8 @@ def test_ignores_non_strings_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_shorter_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -140,8 +141,8 @@ def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -170,8 +171,8 @@ def test_exact_length_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 58145de0411..a1e7310dcf6 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_no_properties_is_valid_passes(self): # no properties is valid @@ -57,8 +58,8 @@ def test_no_properties_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 28a24d6e03f..0da83dac049 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_too_long_is_invalid_fails(self): # too long is invalid @@ -91,8 +92,8 @@ def test_ignores_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -121,8 +122,8 @@ def test_ignores_other_non_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -151,8 +152,8 @@ def test_ignores_strings_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -184,8 +185,8 @@ def test_shorter_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -219,8 +220,8 @@ def test_exact_length_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ca262ddbde2..51f2c384876 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_boundary_point_is_valid_passes(self): # boundary point is valid @@ -56,8 +57,8 @@ def test_boundary_point_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_above_the_minimum_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -140,8 +141,8 @@ def test_ignores_non_numbers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d5842cf8a47..168a1c5453e 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_boundary_point_is_valid_passes(self): # boundary point is valid @@ -56,8 +57,8 @@ def test_boundary_point_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -86,8 +87,8 @@ def test_positive_above_the_minimum_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -164,8 +165,8 @@ def test_boundary_point_with_float_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -194,8 +195,8 @@ def test_negative_above_the_minimum_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -224,8 +225,8 @@ def test_ignores_non_numbers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 4450462f998..1dcffdd7cb4 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_too_short_is_invalid_fails(self): # too short is invalid @@ -81,8 +82,8 @@ def test_ignores_non_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -114,8 +115,8 @@ def test_longer_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -146,8 +147,8 @@ def test_exact_length_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 247a17756b0..528ed105b0c 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_too_short_is_invalid_fails(self): # too short is invalid @@ -104,8 +105,8 @@ def test_longer_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -134,8 +135,8 @@ def test_ignores_non_strings_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -164,8 +165,8 @@ def test_exact_length_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2f3aadb3583..ef5c5db282b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_ignores_arrays_passes(self): # ignores arrays @@ -57,8 +58,8 @@ def test_ignores_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_ignores_other_non_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -142,8 +143,8 @@ def test_ignores_strings_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -177,8 +178,8 @@ def test_longer_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -210,8 +211,8 @@ def test_exact_length_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 9d8f8fbf930..810cd7984ff 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid @@ -80,8 +81,8 @@ def test_null_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 8fc358252fb..1974ddb5102 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid @@ -80,8 +81,8 @@ def test_null_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ffb0092cb84..8fd0db7f32a 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_valid_nested_array_passes(self): # valid nested array @@ -85,8 +86,8 @@ def test_valid_nested_array_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 188ce661ff1..35a8994ab85 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid @@ -80,8 +81,8 @@ def test_null_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 4b615daed14..a5b82d8ed06 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_other_match_passes(self): # other match @@ -59,8 +60,8 @@ def test_other_match_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -116,8 +117,8 @@ def test_match_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 4b505c1b4dd..1c5b946b54b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_allowed_passes(self): # allowed @@ -56,8 +57,8 @@ def test_allowed_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index b0ce13a519c..774d3680059 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_match_string_with_nul_passes(self): # match string with nul @@ -56,8 +57,8 @@ def test_match_string_with_nul_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 39685609338..f49416cf51c 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_a_float_is_not_null_fails(self): # a float is not null @@ -225,8 +226,8 @@ def test_null_is_null_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index aa54a7620bc..003a3f1f77b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_an_array_is_not_a_number_fails(self): # an array is not a number @@ -154,8 +155,8 @@ def test_a_float_is_a_number_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -232,8 +233,8 @@ def test_an_integer_is_a_number_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -262,8 +263,8 @@ def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(sel ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 28b78c68162..02ac356e196 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_ignores_arrays_passes(self): # ignores arrays @@ -57,8 +58,8 @@ def test_ignores_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_ignores_other_non_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -152,8 +153,8 @@ def test_both_properties_present_and_valid_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -186,8 +187,8 @@ def test_doesn_t_invalidate_other_properties_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 55da20de7ef..d0b6aecf657 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_a_float_is_not_an_object_fails(self): # a float is not an object @@ -130,8 +131,8 @@ def test_an_object_is_an_object_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 678c4ad8098..f17f61a9666 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_first_oneof_valid_complex_passes(self): # first oneOf valid (complex) @@ -59,8 +60,8 @@ def test_first_oneof_valid_complex_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -150,8 +151,8 @@ def test_second_oneof_valid_complex_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index ea487855ed5..41307c7f9aa 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_second_oneof_valid_passes(self): # second oneOf valid @@ -56,8 +57,8 @@ def test_second_oneof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_first_oneof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index cfe0200c089..705c43974eb 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_both_oneof_valid_fails(self): # both oneOf valid @@ -104,8 +105,8 @@ def test_one_oneof_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 471fdae40c1..ddbec0e45c5 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_both_valid_invalid_fails(self): # both valid - invalid @@ -80,8 +81,8 @@ def test_one_valid_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index dca5c2b9194..43d4762f15a 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_both_valid_invalid_fails(self): # both valid - invalid @@ -119,8 +120,8 @@ def test_first_valid_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -154,8 +155,8 @@ def test_second_valid_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 245619a9482..6c02d17b75e 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_matches_a_substring_passes(self): # matches a substring @@ -56,8 +57,8 @@ def test_matches_a_substring_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 15e3b6dc969..c751494920a 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_ignores_arrays_passes(self): # ignores arrays @@ -57,8 +58,8 @@ def test_ignores_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -88,8 +89,8 @@ def test_ignores_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -118,8 +119,8 @@ def test_ignores_null_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -148,8 +149,8 @@ def test_ignores_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -202,8 +203,8 @@ def test_ignores_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -232,8 +233,8 @@ def test_a_matching_pattern_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -262,8 +263,8 @@ def test_ignores_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index d3104eca246..85a89181cba 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_object_with_all_numbers_is_valid_passes(self): # object with all numbers is valid @@ -69,8 +70,8 @@ def test_object_with_all_numbers_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 15809e33dbe..3ef85297cee 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -59,8 +60,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 00e6305e31d..1009dd2bd53 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -62,8 +63,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 02b7a73a40d..3d846893ba2 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -59,8 +60,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 5094e0cc1c3..2111d46068d 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -59,8 +60,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 73d211de567..a42e9ff123b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -61,8 +62,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index fa87d826404..1cda687b68c 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -59,8 +60,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 50be3af9dc6..b258dc1c5e2 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -59,8 +60,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3d93977c2bc..93611ac5749 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid @@ -62,8 +63,8 @@ def test_property_named_ref_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c7978bfe4bc..f9a6f103091 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_not_required_by_default_passes(self): # not required by default @@ -57,8 +58,8 @@ def test_not_required_by_default_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index e3c20b581ce..02b8623d972 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_ignores_arrays_passes(self): # ignores arrays @@ -57,8 +58,8 @@ def test_ignores_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -90,8 +91,8 @@ def test_present_required_property_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -120,8 +121,8 @@ def test_ignores_other_non_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -150,8 +151,8 @@ def test_ignores_strings_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2e220a6fccf..1db0f9b7e3f 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_property_not_required_passes(self): # property not required @@ -57,8 +58,8 @@ def test_property_not_required_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 921a4c2923c..3461faf2245 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_object_with_some_properties_missing_is_invalid_fails(self): # object with some properties missing is invalid @@ -98,8 +99,8 @@ def test_object_with_all_properties_present_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index abadbf18cb1..b8c6ad6b4bd 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_something_else_is_invalid_fails(self): # something else is invalid @@ -80,8 +81,8 @@ def test_one_of_the_enum_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index e1a0a1dd840..f2745640089 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_1_is_not_a_string_fails(self): # 1 is not a string @@ -80,8 +81,8 @@ def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -110,8 +111,8 @@ def test_an_empty_string_is_still_a_string_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -262,8 +263,8 @@ def test_a_string_is_a_string_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index c729358716d..984c28c06ad 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_missing_properties_are_not_filled_in_with_the_default_passes(self): # missing properties are not filled in with the default @@ -57,8 +58,8 @@ def test_missing_properties_are_not_filled_in_with_the_default_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -90,8 +91,8 @@ def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(se ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f78f2961df8..b87dd6e5089 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_non_unique_array_of_integers_is_valid_passes(self): # non-unique array of integers is valid @@ -59,8 +60,8 @@ def test_non_unique_array_of_integers_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -98,8 +99,8 @@ def test_unique_array_of_objects_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -149,8 +150,8 @@ def test_non_unique_array_of_nested_objects_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -188,8 +189,8 @@ def test_non_unique_array_of_objects_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -221,8 +222,8 @@ def test_1_and_true_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -254,8 +255,8 @@ def test_unique_array_of_integers_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -291,8 +292,8 @@ def test_non_unique_array_of_arrays_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -325,8 +326,8 @@ def test_numbers_are_unique_if_mathematically_unequal_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -358,8 +359,8 @@ def test_false_is_not_equal_to_zero_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -409,8 +410,8 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -442,8 +443,8 @@ def test_0_and_false_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -479,8 +480,8 @@ def test_unique_array_of_arrays_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -512,8 +513,8 @@ def test_true_is_not_equal_to_one_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -553,8 +554,8 @@ def test_non_unique_heterogeneous_types_are_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -592,8 +593,8 @@ def test_unique_heterogeneous_types_are_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index f7a88f24b26..9a77c3fa72d 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_unique_array_of_objects_is_valid_passes(self): # unique array of objects is valid @@ -65,8 +66,8 @@ def test_unique_array_of_objects_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -104,8 +105,8 @@ def test_a_true_and_a1_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -182,8 +183,8 @@ def test_nested0_and_false_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -221,8 +222,8 @@ def test_a_false_and_a0_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -282,8 +283,8 @@ def test_false_is_not_equal_to_zero_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -319,8 +320,8 @@ def test_0_and_false_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -356,8 +357,8 @@ def test_unique_array_of_arrays_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -462,8 +463,8 @@ def test_true_is_not_equal_to_one_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -533,8 +534,8 @@ def test_unique_array_of_strings_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -570,8 +571,8 @@ def test_1_and_true_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -613,8 +614,8 @@ def test_different_objects_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -646,8 +647,8 @@ def test_unique_array_of_integers_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -764,8 +765,8 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -866,8 +867,8 @@ def test_nested1_and_true_are_unique_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -906,8 +907,8 @@ def test_unique_heterogeneous_types_are_valid_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 2c93b63f9e8..945d168fe9b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 6fa62462b50..a86837a48c5 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) 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 index 3a57d51e1ae..89c2df2e94a 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects @@ -57,8 +58,8 @@ def test_all_string_formats_ignore_objects_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -87,8 +88,8 @@ def test_all_string_formats_ignore_booleans_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -117,8 +118,8 @@ def test_all_string_formats_ignore_integers_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -147,8 +148,8 @@ def test_all_string_formats_ignore_floats_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -178,8 +179,8 @@ def test_all_string_formats_ignore_arrays_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) @@ -208,8 +209,8 @@ def test_all_string_formats_ignore_nulls_passes(self): ) assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + assert isinstance(api_response.body, self.response_body_schema) + deserialized_response_body = self.response_body_schema.from_openapi_data_oapg( payload, _configuration=self._configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py index dfbf6822aa2..5b87db4d6b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py @@ -8,7 +8,7 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass +import dataclasses from decimal import Decimal import enum import email @@ -343,7 +343,7 @@ def _content_type_is_json(cls, content_type: str) -> bool: return False -@dataclass +@dataclasses.dataclass class ParameterBase(JSONDetector): name: str in_type: ParameterInType @@ -783,7 +783,7 @@ def __init__( self.allow_reserved = allow_reserved -@dataclass +@dataclasses.dataclass class MediaType: """ Used to store request and response body schema information @@ -797,7 +797,7 @@ class MediaType: encoding: typing.Optional[typing.Dict[str, Encoding]] = None -@dataclass +@dataclasses.dataclass class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] @@ -806,8 +806,8 @@ class ApiResponse: def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]], - headers: typing.Union[Unset, typing.List[HeaderParameter]] + body: typing.Union[Unset, typing.Type[Schema]] = unset, + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -817,7 +817,7 @@ def __init__( self.headers = headers -@dataclass +@dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse body: typing.Union[Unset, typing.Type[Schema]] = unset diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.py new file mode 100644 index 00000000000..a7c70ef5648 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.py @@ -0,0 +1,24 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, 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 +ObjectTypeMatchesObjects = schemas.DictSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.pyi new file mode 100644 index 00000000000..a7c70ef5648 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_type_matches_objects.pyi @@ -0,0 +1,24 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, 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 +ObjectTypeMatchesObjects = schemas.DictSchema 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 index 3dd512a4cd2..df0bd23b6d5 100644 --- 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 @@ -69,6 +69,7 @@ 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.object_type_matches_objects import ObjectTypeMatchesObjects 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 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index fb323cc1c83..37a60571dd9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate +from .. import path +from . import response_for_200 -request_body_additionalproperties_allows_a_schema_which_should_validate = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesAllowsASchemaWhichShouldValidate -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index 51f747166d0..4df9200d050 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesAllowsASchemaWhichShouldValidate - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py index 8155ff2963b..86cc478b99b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault +from .. import path +from . import response_for_200 -request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesAreAllowedByDefault -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_additionalproperties_are_allowed_by_default_request_body_oapg( @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_additionalproperties_are_allowed_by_default_request_body( @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.pyi index 7be02743e60..c3e1dfde555 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault -request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesAreAllowedByDefault - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_additionalproperties_are_allowed_by_default_request_body_oapg( @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_are_allowed_by_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_additionalproperties_are_allowed_by_default_request_body( @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_are_allowed_by_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py index 6ba0464fbda..060201d75d1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself +from .. import path +from . import response_for_200 -request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesCanExistByItself -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_additionalproperties_can_exist_by_itself_request_body_oapg( @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_additionalproperties_can_exist_by_itself_request_body( @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.pyi index f561016356e..6119340a9a2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself -request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesCanExistByItself - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_additionalproperties_can_exist_by_itself_request_body_oapg( @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_can_exist_by_itself_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_additionalproperties_can_exist_by_itself_request_body( @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_can_exist_by_itself_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index fea43428f8b..1efb6033a67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators +from .. import path +from . import response_for_200 -request_body_additionalproperties_should_not_look_in_applicators = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesShouldNotLookInApplicators -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_additionalproperties_should_not_look_in_applicators_request_body( @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index 0e3ae3974b9..a00d91a8d91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = AdditionalpropertiesShouldNotLookInApplicators - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_additionalproperties_should_not_look_in_applicators_request_body( @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_additionalproperties_should_not_look_in_applicators_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py index e62508b3e27..2bd936a13d7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -# body param -SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof +from .. import path +from . import response_for_200 -request_body_allof_combined_with_anyof_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofCombinedWithAnyofOneof -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_combined_with_anyof_oneof_request_body_oapg( @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_combined_with_anyof_oneof_request_body( @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.pyi index 053e2d964a8..f36e2d42a56 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof -request_body_allof_combined_with_anyof_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofCombinedWithAnyofOneof - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_combined_with_anyof_oneof_request_body_oapg( @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_combined_with_anyof_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_combined_with_anyof_oneof_request_body( @typing.overload def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_combined_with_anyof_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.py index 89a3a940196..f763ebc371c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.allof import Allof -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = Allof -request_body_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Allof + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_allof_request_body_oapg( @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostAllofRequestBody(BaseApi): @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_allof_request_body( @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.pyi index 4deddd781e7..3e324741beb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof import Allof -# body param -SchemaForRequestBodyApplicationJson = Allof +from . import response_for_200 -request_body_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Allof -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostAllofRequestBody(BaseApi): @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostAllofRequestBody(BaseApi): @typing.overload def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.py index f334d8eeb46..d5da30df661 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_simple_types import AllofSimpleTypes -# body param -SchemaForRequestBodyApplicationJson = AllofSimpleTypes +from .. import path +from . import response_for_200 -request_body_allof_simple_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofSimpleTypes -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_simple_types_request_body_oapg( @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofSimpleTypesRequestBody(BaseApi): @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_simple_types_request_body( @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.pyi index 5bc90d06c4c..109651dd09b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AllofSimpleTypes -request_body_allof_simple_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofSimpleTypes - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_simple_types_request_body_oapg( @typing.overload def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_simple_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofSimpleTypesRequestBody(BaseApi): @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_simple_types_request_body( @typing.overload def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_simple_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py index b973fab5af3..229276a93e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -# body param -SchemaForRequestBodyApplicationJson = AllofWithBaseSchema +from .. import path +from . import response_for_200 -request_body_allof_with_base_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithBaseSchema -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_with_base_schema_request_body_oapg( @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_with_base_schema_request_body( @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.pyi index 0af6bbed3ee..5966d14e457 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AllofWithBaseSchema -request_body_allof_with_base_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithBaseSchema - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_with_base_schema_request_body_oapg( @typing.overload def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_with_base_schema_request_body( @typing.overload def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py index 19358a62aea..c88c42fb66e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -# body param -SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema +from .. import path +from . import response_for_200 -request_body_allof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithOneEmptySchema -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_with_one_empty_schema_request_body_oapg( @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofWithOneEmptySchemaRequestBody(BaseApi): @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_with_one_empty_schema_request_body( @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.pyi index 05980415518..e34082ec2e9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema -request_body_allof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithOneEmptySchema - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_with_one_empty_schema_request_body_oapg( @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofWithOneEmptySchemaRequestBody(BaseApi): @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_with_one_empty_schema_request_body( @typing.overload def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index 9094994b1f1..6efe4cb7318 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -# body param -SchemaForRequestBodyApplicationJson = AllofWithTheFirstEmptySchema +from .. import path +from . import response_for_200 -request_body_allof_with_the_first_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithTheFirstEmptySchema -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_with_the_first_empty_schema_request_body_oapg( @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_with_the_first_empty_schema_request_body( @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index 3d2e11c3469..b21544a67ae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = AllofWithTheFirstEmptySchema - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_with_the_first_empty_schema_request_body_oapg( @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_the_first_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_with_the_first_empty_schema_request_body( @typing.overload def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_the_first_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index fa64bb7f00e..cef8ff6fbb4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -# body param -SchemaForRequestBodyApplicationJson = AllofWithTheLastEmptySchema +from .. import path +from . import response_for_200 -request_body_allof_with_the_last_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithTheLastEmptySchema -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_with_the_last_empty_schema_request_body_oapg( @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_with_the_last_empty_schema_request_body( @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index 427873e4714..98a2a02a1ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = AllofWithTheLastEmptySchema - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_with_the_last_empty_schema_request_body_oapg( @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_the_last_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_with_the_last_empty_schema_request_body( @typing.overload def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_the_last_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py index 3f4116de0f3..36cb313d7fc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -# body param -SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas +from .. import path +from . import response_for_200 -request_body_allof_with_two_empty_schemas = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithTwoEmptySchemas -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_allof_with_two_empty_schemas_request_body_oapg( @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_allof_with_two_empty_schemas_request_body( @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.pyi index c47e5a94113..baf17e20546 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas -request_body_allof_with_two_empty_schemas = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AllofWithTwoEmptySchemas - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_allof_with_two_empty_schemas_request_body_oapg( @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_allof_with_two_empty_schemas_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_allof_with_two_empty_schemas_request_body( @typing.overload def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_allof_with_two_empty_schemas_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py index 8b1ea8f8ca4..aabb1d22935 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -# body param -SchemaForRequestBodyApplicationJson = AnyofComplexTypes +from .. import path +from . import response_for_200 -request_body_anyof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AnyofComplexTypes -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_anyof_complex_types_request_body_oapg( @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAnyofComplexTypesRequestBody(BaseApi): @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_anyof_complex_types_request_body( @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.pyi index bc529f7e117..106e8af5f48 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AnyofComplexTypes -request_body_anyof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AnyofComplexTypes - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_anyof_complex_types_request_body_oapg( @typing.overload def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAnyofComplexTypesRequestBody(BaseApi): @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_anyof_complex_types_request_body( @typing.overload def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.py index 8e99ee7a3c2..dab283e8b17 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.anyof import Anyof -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = Anyof -request_body_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Anyof + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_anyof_request_body_oapg( @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostAnyofRequestBody(BaseApi): @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_anyof_request_body( @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.pyi index 69a0a26d932..10b760da6e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.anyof import Anyof -# body param -SchemaForRequestBodyApplicationJson = Anyof +from . import response_for_200 -request_body_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Anyof -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostAnyofRequestBody(BaseApi): @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostAnyofRequestBody(BaseApi): @typing.overload def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py index 217369cd910..4d0ae8c2e0a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AnyofWithBaseSchema + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_anyof_with_base_schema_request_body_oapg( @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostAnyofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_anyof_with_base_schema_request_body( @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.pyi index bc85fc6cd10..7e7cf205a91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -# body param -SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AnyofWithBaseSchema -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostAnyofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostAnyofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py index fdd3f85a03f..caa890cfd76 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -# body param -SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema +from .. import path +from . import response_for_200 -request_body_anyof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AnyofWithOneEmptySchema -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_anyof_with_one_empty_schema_request_body_oapg( @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_anyof_with_one_empty_schema_request_body( @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.pyi index f08f875b413..06e9f0680b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema -request_body_anyof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = AnyofWithOneEmptySchema - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_anyof_with_one_empty_schema_request_body_oapg( @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_anyof_with_one_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_anyof_with_one_empty_schema_request_body( @typing.overload def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_anyof_with_one_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py index 672a3a3a6a4..164a202b37d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -# body param -SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays +from .. import path +from . import response_for_200 -request_body_array_type_matches_arrays = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ArrayTypeMatchesArrays -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_array_type_matches_arrays_request_body_oapg( @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostArrayTypeMatchesArraysRequestBody(BaseApi): @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_array_type_matches_arrays_request_body( @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.pyi index 7511003b1d1..c4bd526c1ed 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays -request_body_array_type_matches_arrays = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ArrayTypeMatchesArrays - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_array_type_matches_arrays_request_body_oapg( @typing.overload def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_array_type_matches_arrays_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostArrayTypeMatchesArraysRequestBody(BaseApi): @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_array_type_matches_arrays_request_body( @typing.overload def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_array_type_matches_arrays_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py index db22058d0fe..c4515ab8d82 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py @@ -25,33 +25,28 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema +from .. import path +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = BooleanTypeMatchesBooleans -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) _status_code_to_response = { - '200': _response_for_200, + '200': response_for_200.response, } @@ -59,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -94,19 +89,19 @@ def _post_boolean_type_matches_booleans_request_body_oapg( @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -127,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,32 +159,32 @@ class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -199,19 +194,19 @@ def post_boolean_type_matches_booleans_request_body( @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -267,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.pyi index b30d7be40c5..c7ddbbad910 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.pyi @@ -25,61 +25,56 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = BooleanTypeMatchesBooleans - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -89,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_boolean_type_matches_booleans_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -122,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,32 +154,32 @@ class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -194,19 +189,19 @@ class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): @typing.overload def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_boolean_type_matches_booleans_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -262,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.py index 5d69029a348..c5728aa9745 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.by_int import ByInt -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = ByInt -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ByInt + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_by_int_request_body_oapg( @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostByIntRequestBody(BaseApi): @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_by_int_request_body( @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.pyi index 599b4979b68..779c7a3c633 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.by_int import ByInt -# body param -SchemaForRequestBodyApplicationJson = ByInt +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ByInt -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_by_int_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostByIntRequestBody(BaseApi): @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostByIntRequestBody(BaseApi): @typing.overload def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_by_int_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.py index 8e84300e738..63337a0e311 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.by_number import ByNumber -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = ByNumber -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ByNumber + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_by_number_request_body_oapg( @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostByNumberRequestBody(BaseApi): @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_by_number_request_body( @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.pyi index 2965ae19194..f4b51559749 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.by_number import ByNumber -# body param -SchemaForRequestBodyApplicationJson = ByNumber +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ByNumber -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_by_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostByNumberRequestBody(BaseApi): @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostByNumberRequestBody(BaseApi): @typing.overload def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_by_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.py index 668ee59186b..22a3538a8f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.by_small_number import BySmallNumber -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = BySmallNumber -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = BySmallNumber + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_by_small_number_request_body_oapg( @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostBySmallNumberRequestBody(BaseApi): @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_by_small_number_request_body( @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.pyi index adc387a8ea6..fa8c887228f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.by_small_number import BySmallNumber -# body param -SchemaForRequestBodyApplicationJson = BySmallNumber +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = BySmallNumber -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_by_small_number_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostBySmallNumberRequestBody(BaseApi): @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostBySmallNumberRequestBody(BaseApi): @typing.overload def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_by_small_number_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 9499c4998d1..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,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # 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(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 e75c82d05ca..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,314 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.py new file mode 100644 index 00000000000..712a9031912 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.date_time_format import DateTimeFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = DateTimeFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_date_time_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..08a362c02df --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.date_time_format import DateTimeFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = DateTimeFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_date_time_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 61c0e558b28..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,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 - -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(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 624a2c83bd0..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.py new file mode 100644 index 00000000000..747c4fd4a96 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.email_format import EmailFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = EmailFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_email_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..2fa69c0b64c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.email_format import EmailFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = EmailFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_email_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_email_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index 1d6fde1b757..263f563ab26 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = EnumWith0DoesNotMatchFalse -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWith0DoesNotMatchFalse + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_enum_with0_does_not_match_false_request_body_oapg( @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_enum_with0_does_not_match_false_request_body( @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to 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/__init__.pyi index fc3b37cec26..d22e31a208f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ 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 +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWith0DoesNotMatchFalse -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with0_does_not_match_false_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): @typing.overload def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with0_does_not_match_false_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index e54e98dc389..355c141e466 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = EnumWith1DoesNotMatchTrue -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWith1DoesNotMatchTrue + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_enum_with1_does_not_match_true_request_body_oapg( @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_enum_with1_does_not_match_true_request_body( @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to 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/__init__.pyi index 5dfa978e1f2..7ace200fb6f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ 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 +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWith1DoesNotMatchTrue -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with1_does_not_match_true_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): @typing.overload def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with1_does_not_match_true_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py index abf4252d662..25b4a9655b7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWithEscapedCharacters + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_enum_with_escaped_characters_request_body_oapg( @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostEnumWithEscapedCharactersRequestBody(BaseApi): @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_enum_with_escaped_characters_request_body( @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.pyi index ae3cd9c56a5..7dfa44fe938 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -# body param -SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWithEscapedCharacters -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostEnumWithEscapedCharactersRequestBody(BaseApi): @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostEnumWithEscapedCharactersRequestBody(BaseApi): @typing.overload def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index f13496bc396..e312bad827c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = EnumWithFalseDoesNotMatch0 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWithFalseDoesNotMatch0 + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_enum_with_false_does_not_match0_request_body_oapg( @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_enum_with_false_does_not_match0_request_body( @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to 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/__init__.pyi index d2a2fb5b1a7..56971de21c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ 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 +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWithFalseDoesNotMatch0 -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with_false_does_not_match0_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): @typing.overload def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with_false_does_not_match0_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index cdda0d34c52..f82df3450ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = EnumWithTrueDoesNotMatch1 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWithTrueDoesNotMatch1 + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_enum_with_true_does_not_match1_request_body_oapg( @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_enum_with_true_does_not_match1_request_body( @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to 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/__init__.pyi index ede86715a92..693914a8c52 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ 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 +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumWithTrueDoesNotMatch1 -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enum_with_true_does_not_match1_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): @typing.overload def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enum_with_true_does_not_match1_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.py index 082bb8a018e..4191a7652f6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.enums_in_properties import EnumsInProperties -# body param -SchemaForRequestBodyApplicationJson = EnumsInProperties +from .. import path +from . import response_for_200 -request_body_enums_in_properties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumsInProperties -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_enums_in_properties_request_body_oapg( @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostEnumsInPropertiesRequestBody(BaseApi): @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_enums_in_properties_request_body( @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.pyi index dc053602f57..b0e52f289aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.enums_in_properties import EnumsInProperties -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = EnumsInProperties -request_body_enums_in_properties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = EnumsInProperties - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_enums_in_properties_request_body_oapg( @typing.overload def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_enums_in_properties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostEnumsInPropertiesRequestBody(BaseApi): @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_enums_in_properties_request_body( @typing.overload def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_enums_in_properties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.py index 688fcb76f94..9b1744738a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.forbidden_property import ForbiddenProperty -# body param -SchemaForRequestBodyApplicationJson = ForbiddenProperty +from .. import path +from . import response_for_200 -request_body_forbidden_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ForbiddenProperty -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_forbidden_property_request_body_oapg( @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostForbiddenPropertyRequestBody(BaseApi): @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_forbidden_property_request_body( @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.pyi index e1e44621625..56769a5273c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.forbidden_property import ForbiddenProperty -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = ForbiddenProperty -request_body_forbidden_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ForbiddenProperty - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_forbidden_property_request_body_oapg( @typing.overload def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_forbidden_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostForbiddenPropertyRequestBody(BaseApi): @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_forbidden_property_request_body( @typing.overload def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_forbidden_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 531dc56c32a..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,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 - -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(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 96b59201e87..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.py new file mode 100644 index 00000000000..06ab0b855aa --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.hostname_format import HostnameFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = HostnameFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_hostname_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..a32120bcf46 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.hostname_format import HostnameFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = HostnameFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_hostname_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py index a2d00a4f70c..4c90653670e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py @@ -25,61 +25,61 @@ from unit_test_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.IntSchema +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = IntegerTypeMatchesIntegers + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -89,19 +89,19 @@ def _post_integer_type_matches_integers_request_body_oapg( @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -122,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,32 +159,32 @@ class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -194,19 +194,19 @@ def post_integer_type_matches_integers_request_body( @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -262,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 78% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.pyi index 746839d1cdf..556d4aa5c3e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.pyi @@ -25,66 +25,56 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers -# body param -SchemaForRequestBodyApplicationJson = schemas.IntSchema +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = IntegerTypeMatchesIntegers -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -94,19 +84,19 @@ def _post_integer_type_matches_integers_request_body_oapg( @typing.overload def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_integer_type_matches_integers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -127,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,32 +154,32 @@ class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -199,19 +189,19 @@ def post_integer_type_matches_integers_request_body( @typing.overload def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_integer_type_matches_integers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -267,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index a4373898774..2b80770abea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_reques @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(Base @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_request @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 82% rename from 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 rename to 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/__init__.pyi index 15c6c301222..f349b81a003 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ 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 +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(Base @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(Base @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py index 00c9f71b026..ada20d4b8d1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -# body param -SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault +from .. import path +from . import response_for_200 -request_body_invalid_string_value_for_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = InvalidStringValueForDefault -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_invalid_string_value_for_default_request_body_oapg( @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostInvalidStringValueForDefaultRequestBody(BaseApi): @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_invalid_string_value_for_default_request_body( @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.pyi index 27ac8568811..f3a71721954 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault -request_body_invalid_string_value_for_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = InvalidStringValueForDefault - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_invalid_string_value_for_default_request_body_oapg( @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_invalid_string_value_for_default_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostInvalidStringValueForDefaultRequestBody(BaseApi): @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_invalid_string_value_for_default_request_body( @typing.overload def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_invalid_string_value_for_default_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 9ffdb8d5be0..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,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 - -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(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 21a1c8c5040..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.py new file mode 100644 index 00000000000..14176c34de2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.ipv4_format import Ipv4Format + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = Ipv4Format + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv4_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..8ba64e14106 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.ipv4_format import Ipv4Format + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = Ipv4Format + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv4_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 8fb701cc61f..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,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 - -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(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 b50a09052e9..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e2500e7b2e3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.ipv6_format import Ipv6Format + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = Ipv6Format + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv6_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..87f9d0d0fe4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.ipv6_format import Ipv6Format + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = Ipv6Format + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv6_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 1ad92bc8258..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,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 - -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(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 4e2d9ef6c59..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.py new file mode 100644 index 00000000000..1259e4a8367 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.json_pointer_format import JsonPointerFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = JsonPointerFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_json_pointer_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..7cf84230728 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.json_pointer_format import JsonPointerFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = JsonPointerFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_json_pointer_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.py index 982f83c735b..a0771a1e7b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.maximum_validation import MaximumValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MaximumValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaximumValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_maximum_validation_request_body_oapg( @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMaximumValidationRequestBody(BaseApi): @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_maximum_validation_request_body( @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.pyi index a0723cca701..ca9a3084940 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maximum_validation import MaximumValidation -# body param -SchemaForRequestBodyApplicationJson = MaximumValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaximumValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maximum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMaximumValidationRequestBody(BaseApi): @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMaximumValidationRequestBody(BaseApi): @typing.overload def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maximum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py index fcf0f9c4e2d..0761ee85106 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaximumValidationWithUnsignedInteger + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_maximum_validation_with_unsigned_integer_request_body_oapg( @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_maximum_validation_with_unsigned_integer_request_body( @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.pyi index 4e5c945af52..88d90ba6ec0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -# body param -SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaximumValidationWithUnsignedInteger -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maximum_validation_with_unsigned_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maximum_validation_with_unsigned_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.py index 08f984ff02d..e58df3a1f68 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.maxitems_validation import MaxitemsValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MaxitemsValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaxitemsValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_maxitems_validation_request_body_oapg( @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMaxitemsValidationRequestBody(BaseApi): @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_maxitems_validation_request_body( @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.pyi index a42d2f09c2f..9276ebbbc85 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxitems_validation import MaxitemsValidation -# body param -SchemaForRequestBodyApplicationJson = MaxitemsValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaxitemsValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMaxitemsValidationRequestBody(BaseApi): @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMaxitemsValidationRequestBody(BaseApi): @typing.overload def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.py index d9f0c7ca462..121d858a204 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.maxlength_validation import MaxlengthValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MaxlengthValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaxlengthValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_maxlength_validation_request_body_oapg( @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMaxlengthValidationRequestBody(BaseApi): @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_maxlength_validation_request_body( @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.pyi index b2e42052a3a..92a7b987edc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxlength_validation import MaxlengthValidation -# body param -SchemaForRequestBodyApplicationJson = MaxlengthValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaxlengthValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMaxlengthValidationRequestBody(BaseApi): @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMaxlengthValidationRequestBody(BaseApi): @typing.overload def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index 8df9e45dde1..8f24c308fd8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Maxproperties0MeansTheObjectIsEmpty + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_maxproperties0_means_the_object_is_empty_request_body( @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to 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/__init__.pyi index 544af50745a..a9f10243804 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ 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 +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Maxproperties0MeansTheObjectIsEmpty -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxproperties0_means_the_object_is_empty_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py index 67fd2d8ab4d..cd0c1f72fe0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MaxpropertiesValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaxpropertiesValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_maxproperties_validation_request_body_oapg( @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMaxpropertiesValidationRequestBody(BaseApi): @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_maxproperties_validation_request_body( @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.pyi index 5119d69b5ed..5f31216b4c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -# body param -SchemaForRequestBodyApplicationJson = MaxpropertiesValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MaxpropertiesValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_maxproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMaxpropertiesValidationRequestBody(BaseApi): @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMaxpropertiesValidationRequestBody(BaseApi): @typing.overload def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_maxproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.py index b1e1c0d2275..bfef05be67d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.minimum_validation import MinimumValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MinimumValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinimumValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_minimum_validation_request_body_oapg( @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMinimumValidationRequestBody(BaseApi): @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_minimum_validation_request_body( @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.pyi index 0e7fa1996fa..6e0a8d1b0f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minimum_validation import MinimumValidation -# body param -SchemaForRequestBodyApplicationJson = MinimumValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinimumValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minimum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMinimumValidationRequestBody(BaseApi): @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMinimumValidationRequestBody(BaseApi): @typing.overload def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minimum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py index 78129065be1..c4902e8de6e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinimumValidationWithSignedInteger + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_minimum_validation_with_signed_integer_request_body_oapg( @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_minimum_validation_with_signed_integer_request_body( @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.pyi index c8539721b25..d7aa1a91082 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -# body param -SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinimumValidationWithSignedInteger -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minimum_validation_with_signed_integer_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): @typing.overload def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minimum_validation_with_signed_integer_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.py index e6282c3f44e..6e56ccc1308 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.minitems_validation import MinitemsValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MinitemsValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinitemsValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_minitems_validation_request_body_oapg( @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMinitemsValidationRequestBody(BaseApi): @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_minitems_validation_request_body( @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.pyi index d755c0d7557..403998c0f80 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minitems_validation import MinitemsValidation -# body param -SchemaForRequestBodyApplicationJson = MinitemsValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinitemsValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMinitemsValidationRequestBody(BaseApi): @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMinitemsValidationRequestBody(BaseApi): @typing.overload def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.py index 192b4f1d158..f863d1535a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.minlength_validation import MinlengthValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MinlengthValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinlengthValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_minlength_validation_request_body_oapg( @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMinlengthValidationRequestBody(BaseApi): @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_minlength_validation_request_body( @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.pyi index 7436c84bb26..02bc19ee81a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minlength_validation import MinlengthValidation -# body param -SchemaForRequestBodyApplicationJson = MinlengthValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinlengthValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minlength_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMinlengthValidationRequestBody(BaseApi): @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMinlengthValidationRequestBody(BaseApi): @typing.overload def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minlength_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.py index e6162712122..81c5ccd640c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = MinpropertiesValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinpropertiesValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_minproperties_validation_request_body_oapg( @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostMinpropertiesValidationRequestBody(BaseApi): @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_minproperties_validation_request_body( @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.pyi index 2d4602b4aaf..02d829808d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minproperties_validation import MinpropertiesValidation -# body param -SchemaForRequestBodyApplicationJson = MinpropertiesValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = MinpropertiesValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_minproperties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostMinpropertiesValidationRequestBody(BaseApi): @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostMinpropertiesValidationRequestBody(BaseApi): @typing.overload def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_minproperties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index ba2e00fa218..17ac007003f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -# body param -SchemaForRequestBodyApplicationJson = NestedAllofToCheckValidationSemantics +from .. import path +from . import response_for_200 -request_body_nested_allof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NestedAllofToCheckValidationSemantics -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_nested_allof_to_check_validation_semantics_request_body_oapg( @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_nested_allof_to_check_validation_semantics_request_body( @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index 04886b3f9f7..c66ab6cd23c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = NestedAllofToCheckValidationSemantics - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_nested_allof_to_check_validation_semantics_request_body_oapg( @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_allof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_nested_allof_to_check_validation_semantics_request_body( @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_allof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index b660117c48b..8ed6bbc08d0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -# body param -SchemaForRequestBodyApplicationJson = NestedAnyofToCheckValidationSemantics +from .. import path +from . import response_for_200 -request_body_nested_anyof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NestedAnyofToCheckValidationSemantics -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_nested_anyof_to_check_validation_semantics_request_body( @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index ddfa4e71d84..93ab8652c75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = NestedAnyofToCheckValidationSemantics - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_nested_anyof_to_check_validation_semantics_request_body( @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_anyof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.py index f46fe5841fc..6c5cb539202 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.nested_items import NestedItems -# body param -SchemaForRequestBodyApplicationJson = NestedItems +from .. import path +from . import response_for_200 -request_body_nested_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NestedItems -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_nested_items_request_body_oapg( @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostNestedItemsRequestBody(BaseApi): @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_nested_items_request_body( @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.pyi index 2072cebde77..351ebebbec9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.nested_items import NestedItems -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = NestedItems -request_body_nested_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NestedItems - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_nested_items_request_body_oapg( @typing.overload def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostNestedItemsRequestBody(BaseApi): @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_nested_items_request_body( @typing.overload def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index fa49ae4894c..0f43316163f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -# body param -SchemaForRequestBodyApplicationJson = NestedOneofToCheckValidationSemantics +from .. import path +from . import response_for_200 -request_body_nested_oneof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NestedOneofToCheckValidationSemantics -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_nested_oneof_to_check_validation_semantics_request_body( @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index eeeb6bfee2f..dd705e24fbc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = NestedOneofToCheckValidationSemantics - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_nested_oneof_to_check_validation_semantics_request_body( @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nested_oneof_to_check_validation_semantics_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 7d44a344cc2..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,367 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # 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(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 5f1d96b0b86..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,362 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__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/post/__init__.py new file mode 100644 index 00000000000..54e34e96f6b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = NotMoreComplexSchema + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..a95b6367ff9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = NotMoreComplexSchema + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 1fdc4937405..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,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 - -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(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 ef2e02253ee..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/__init__.py new file mode 100644 index 00000000000..782c06f820c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.model_not import ModelNot + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = ModelNot + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/__init__.pyi new file mode 100644 index 00000000000..dc239610dce --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.model_not import ModelNot + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = ModelNot + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py index d4b9e53a033..2c1b1825f8c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = NulCharactersInStrings -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NulCharactersInStrings + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_nul_characters_in_strings_request_body_oapg( @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostNulCharactersInStringsRequestBody(BaseApi): @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_nul_characters_in_strings_request_body( @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.pyi index 7445caa5a56..e4a72120461 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -# body param -SchemaForRequestBodyApplicationJson = NulCharactersInStrings +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NulCharactersInStrings -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_nul_characters_in_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostNulCharactersInStringsRequestBody(BaseApi): @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostNulCharactersInStringsRequestBody(BaseApi): @typing.overload def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_nul_characters_in_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from 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 rename to 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/__init__.py index c94d8b66af9..a165a22e182 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py @@ -25,33 +25,28 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject -# body param -SchemaForRequestBodyApplicationJson = schemas.NoneSchema +from .. import path +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NullTypeMatchesOnlyTheNullObject -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) _status_code_to_response = { - '200': _response_for_200, + '200': response_for_200.response, } @@ -59,32 +54,32 @@ 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, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -94,19 +89,19 @@ def _post_null_type_matches_only_the_null_object_request_body_oapg( @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -127,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,32 +159,32 @@ class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -199,19 +194,19 @@ def post_null_type_matches_only_the_null_object_request_body( @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -267,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index 6adc097d24b..2657018917c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.pyi @@ -25,61 +25,56 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.NoneSchema +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = NullTypeMatchesOnlyTheNullObject - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) 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, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -89,19 +84,19 @@ 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, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_null_type_matches_only_the_null_object_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -122,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,32 +154,32 @@ class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -194,19 +189,19 @@ class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): @typing.overload def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_null_type_matches_only_the_null_object_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -262,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 77% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py index f4f08b5ead6..8d6012d7896 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py @@ -25,61 +25,61 @@ from unit_test_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.NumberSchema +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = NumberTypeMatchesNumbers + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -89,19 +89,19 @@ def _post_number_type_matches_numbers_request_body_oapg( @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -122,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,32 +159,32 @@ class PostNumberTypeMatchesNumbersRequestBody(BaseApi): @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -194,19 +194,19 @@ def post_number_type_matches_numbers_request_body( @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -262,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.pyi index 1ca41209480..69f6685c750 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.pyi @@ -25,66 +25,56 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers -# body param -SchemaForRequestBodyApplicationJson = schemas.NumberSchema +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = NumberTypeMatchesNumbers -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) 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, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -94,19 +84,19 @@ def _post_number_type_matches_numbers_request_body_oapg( @typing.overload def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_number_type_matches_numbers_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -127,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,32 +154,32 @@ class PostNumberTypeMatchesNumbersRequestBody(BaseApi): @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -199,19 +189,19 @@ def post_number_type_matches_numbers_request_body( @typing.overload def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_number_type_matches_numbers_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -267,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.py index 0a0ecb89fee..c79985f9b0a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -# body param -SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation +from .. import path +from . import response_for_200 -request_body_object_properties_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ObjectPropertiesValidation -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_object_properties_validation_request_body_oapg( @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostObjectPropertiesValidationRequestBody(BaseApi): @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_object_properties_validation_request_body( @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.pyi index 6b2af7b5d7a..b541e0f8038 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation -request_body_object_properties_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ObjectPropertiesValidation - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_object_properties_validation_request_body_oapg( @typing.overload def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_object_properties_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostObjectPropertiesValidationRequestBody(BaseApi): @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_object_properties_validation_request_body( @typing.overload def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_object_properties_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 77% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py index 26a3aa0e9d7..8799c026935 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py @@ -25,61 +25,61 @@ from unit_test_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema +from unit_test_api.model.object_type_matches_objects import ObjectTypeMatchesObjects +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = ObjectTypeMatchesObjects + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -89,19 +89,19 @@ def _post_object_type_matches_objects_request_body_oapg( @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -122,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,32 +159,32 @@ class PostObjectTypeMatchesObjectsRequestBody(BaseApi): @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -194,19 +194,19 @@ def post_object_type_matches_objects_request_body( @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -262,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.pyi index 9458ed3bdbb..6f867ff44cf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.pyi @@ -25,66 +25,56 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from unit_test_api.model.object_type_matches_objects import ObjectTypeMatchesObjects -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = ObjectTypeMatchesObjects -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -94,19 +84,19 @@ def _post_object_type_matches_objects_request_body_oapg( @typing.overload def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_object_type_matches_objects_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -127,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,32 +154,32 @@ class PostObjectTypeMatchesObjectsRequestBody(BaseApi): @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -199,19 +189,19 @@ def post_object_type_matches_objects_request_body( @typing.overload def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_object_type_matches_objects_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -267,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py index 5c61455e783..bb2eb7212e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.oneof_complex_types import OneofComplexTypes -# body param -SchemaForRequestBodyApplicationJson = OneofComplexTypes +from .. import path +from . import response_for_200 -request_body_oneof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofComplexTypes -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_oneof_complex_types_request_body_oapg( @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostOneofComplexTypesRequestBody(BaseApi): @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_oneof_complex_types_request_body( @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.pyi index 1e9c85a757b..4449576944c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = OneofComplexTypes -request_body_oneof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofComplexTypes - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_oneof_complex_types_request_body_oapg( @typing.overload def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_complex_types_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostOneofComplexTypesRequestBody(BaseApi): @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_oneof_complex_types_request_body( @typing.overload def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_complex_types_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.py index bc372832e58..b08682e70e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.oneof import Oneof -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = Oneof -request_body_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Oneof + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_oneof_request_body_oapg( @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostOneofRequestBody(BaseApi): @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_oneof_request_body( @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.pyi index 78a9a83c941..e9715379cc2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof import Oneof -# body param -SchemaForRequestBodyApplicationJson = Oneof +from . import response_for_200 -request_body_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Oneof -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostOneofRequestBody(BaseApi): @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostOneofRequestBody(BaseApi): @typing.overload def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py index 8d00db16b53..d4031f08a60 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = OneofWithBaseSchema -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofWithBaseSchema + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_oneof_with_base_schema_request_body_oapg( @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostOneofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_oneof_with_base_schema_request_body( @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.pyi index 0d4fe45599d..8381be60394 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -# body param -SchemaForRequestBodyApplicationJson = OneofWithBaseSchema +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofWithBaseSchema -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_with_base_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostOneofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostOneofWithBaseSchemaRequestBody(BaseApi): @typing.overload def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_with_base_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py index 2d419104035..0ddb60571fa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -# body param -SchemaForRequestBodyApplicationJson = OneofWithEmptySchema +from .. import path +from . import response_for_200 -request_body_oneof_with_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofWithEmptySchema -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_oneof_with_empty_schema_request_body_oapg( @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostOneofWithEmptySchemaRequestBody(BaseApi): @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_oneof_with_empty_schema_request_body( @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.pyi index de00a1e19e9..2524b27b8fb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = OneofWithEmptySchema -request_body_oneof_with_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofWithEmptySchema - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_oneof_with_empty_schema_request_body_oapg( @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_with_empty_schema_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostOneofWithEmptySchemaRequestBody(BaseApi): @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_oneof_with_empty_schema_request_body( @typing.overload def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_with_empty_schema_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.py index b75ad8f9a94..519772204e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.oneof_with_required import OneofWithRequired -# body param -SchemaForRequestBodyApplicationJson = OneofWithRequired +from .. import path +from . import response_for_200 -request_body_oneof_with_required = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofWithRequired -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_oneof_with_required_request_body_oapg( @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostOneofWithRequiredRequestBody(BaseApi): @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_oneof_with_required_request_body( @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.pyi index e32e6df399a..79a3850ddc6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.oneof_with_required import OneofWithRequired -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = OneofWithRequired -request_body_oneof_with_required = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = OneofWithRequired - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_oneof_with_required_request_body_oapg( @typing.overload def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_oneof_with_required_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostOneofWithRequiredRequestBody(BaseApi): @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_oneof_with_required_request_body( @typing.overload def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_oneof_with_required_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py index c5120a7acd7..026c9447475 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = PatternIsNotAnchored -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PatternIsNotAnchored + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_pattern_is_not_anchored_request_body_oapg( @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostPatternIsNotAnchoredRequestBody(BaseApi): @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_pattern_is_not_anchored_request_body( @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.pyi index 1848470356a..c9b29dafde0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -# body param -SchemaForRequestBodyApplicationJson = PatternIsNotAnchored +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PatternIsNotAnchored -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_pattern_is_not_anchored_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostPatternIsNotAnchoredRequestBody(BaseApi): @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostPatternIsNotAnchoredRequestBody(BaseApi): @typing.overload def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_pattern_is_not_anchored_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.py index 422b433e46e..1bb3cf76ca0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.pattern_validation import PatternValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = PatternValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PatternValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_pattern_validation_request_body_oapg( @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostPatternValidationRequestBody(BaseApi): @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_pattern_validation_request_body( @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.pyi index d8126709666..fd1a76d3282 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.pattern_validation import PatternValidation -# body param -SchemaForRequestBodyApplicationJson = PatternValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PatternValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_pattern_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostPatternValidationRequestBody(BaseApi): @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostPatternValidationRequestBody(BaseApi): @typing.overload def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_pattern_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py index 1bab1c15f17..649fe0049d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -# body param -SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters +from .. import path +from . import response_for_200 -request_body_properties_with_escaped_characters = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PropertiesWithEscapedCharacters -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_properties_with_escaped_characters_request_body_oapg( @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_properties_with_escaped_characters_request_body( @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.pyi index bcc74a2ae9f..cfe13c81d3b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters -request_body_properties_with_escaped_characters = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PropertiesWithEscapedCharacters - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_properties_with_escaped_characters_request_body_oapg( @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_properties_with_escaped_characters_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_properties_with_escaped_characters_request_body( @typing.overload def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_properties_with_escaped_characters_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index ff3985bce85..7560562b022 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -# body param -SchemaForRequestBodyApplicationJson = PropertyNamedRefThatIsNotAReference +from .. import path +from . import response_for_200 -request_body_property_named_ref_that_is_not_a_reference = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = PropertyNamedRefThatIsNotAReference -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_property_named_ref_that_is_not_a_reference_request_body( @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index a176ec4b34e..e5f6205f484 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = PropertyNamedRefThatIsNotAReference - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_property_named_ref_that_is_not_a_reference_request_body( @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_property_named_ref_that_is_not_a_reference_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py index ae66e236baa..81d25a6ac05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -# body param -SchemaForRequestBodyApplicationJson = RefInAdditionalproperties +from .. import path +from . import response_for_200 -request_body_ref_in_additionalproperties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInAdditionalproperties -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_ref_in_additionalproperties_request_body_oapg( @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRefInAdditionalpropertiesRequestBody(BaseApi): @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_ref_in_additionalproperties_request_body( @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.pyi index baae0992b51..78edf0a05e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RefInAdditionalproperties -request_body_ref_in_additionalproperties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInAdditionalproperties - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_ref_in_additionalproperties_request_body_oapg( @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_additionalproperties_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRefInAdditionalpropertiesRequestBody(BaseApi): @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_ref_in_additionalproperties_request_body( @typing.overload def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_additionalproperties_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/__init__.py index 6eddfe043b5..dc03e779ccc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.ref_in_allof import RefInAllof -# body param -SchemaForRequestBodyApplicationJson = RefInAllof +from .. import path +from . import response_for_200 -request_body_ref_in_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInAllof -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_ref_in_allof_request_body_oapg( @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRefInAllofRequestBody(BaseApi): @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_ref_in_allof_request_body( @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/__init__.pyi index 32d5d6cba98..e0699b64553 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.ref_in_allof import RefInAllof -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RefInAllof -request_body_ref_in_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInAllof - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_ref_in_allof_request_body_oapg( @typing.overload def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_allof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRefInAllofRequestBody(BaseApi): @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_ref_in_allof_request_body( @typing.overload def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_allof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py index 61d129a8cd2..bcfee9da8b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.ref_in_anyof import RefInAnyof -# body param -SchemaForRequestBodyApplicationJson = RefInAnyof +from .. import path +from . import response_for_200 -request_body_ref_in_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInAnyof -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_ref_in_anyof_request_body_oapg( @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRefInAnyofRequestBody(BaseApi): @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_ref_in_anyof_request_body( @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/__init__.pyi index c61b0c03460..7d58ccbfb6e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.ref_in_anyof import RefInAnyof -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RefInAnyof -request_body_ref_in_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInAnyof - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_ref_in_anyof_request_body_oapg( @typing.overload def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_anyof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRefInAnyofRequestBody(BaseApi): @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_ref_in_anyof_request_body( @typing.overload def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_anyof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/__init__.py index b41e000b84b..8a836762095 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.ref_in_items import RefInItems -# body param -SchemaForRequestBodyApplicationJson = RefInItems +from .. import path +from . import response_for_200 -request_body_ref_in_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInItems -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_ref_in_items_request_body_oapg( @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRefInItemsRequestBody(BaseApi): @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_ref_in_items_request_body( @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/__init__.pyi index 3cf5261cef9..15bd83cc7b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.ref_in_items import RefInItems -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RefInItems -request_body_ref_in_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInItems - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_ref_in_items_request_body_oapg( @typing.overload def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_items_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRefInItemsRequestBody(BaseApi): @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_ref_in_items_request_body( @typing.overload def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_items_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 16778e01bf1..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,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 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(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 18e7489d24a..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,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 - -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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.py new file mode 100644 index 00000000000..cd5d4c5738a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_not import RefInNot + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = RefInNot + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.pyi new file mode 100644 index 00000000000..2d15d763b4d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_not import RefInNot + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = RefInNot + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_not_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py index e3ca8f0a1bc..2d96a3d16fc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.ref_in_oneof import RefInOneof -# body param -SchemaForRequestBodyApplicationJson = RefInOneof +from .. import path +from . import response_for_200 -request_body_ref_in_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInOneof -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_ref_in_oneof_request_body_oapg( @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRefInOneofRequestBody(BaseApi): @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_ref_in_oneof_request_body( @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/__init__.pyi index f1dc48460c4..58783a33638 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.ref_in_oneof import RefInOneof -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RefInOneof -request_body_ref_in_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInOneof - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_ref_in_oneof_request_body_oapg( @typing.overload def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_oneof_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRefInOneofRequestBody(BaseApi): @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_ref_in_oneof_request_body( @typing.overload def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_oneof_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/__init__.py index 105713baa0e..df62cedfa61 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.ref_in_property import RefInProperty -# body param -SchemaForRequestBodyApplicationJson = RefInProperty +from .. import path +from . import response_for_200 -request_body_ref_in_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInProperty -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_ref_in_property_request_body_oapg( @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRefInPropertyRequestBody(BaseApi): @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_ref_in_property_request_body( @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/__init__.pyi index bc58c723b40..8299e55bb35 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.ref_in_property import RefInProperty -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RefInProperty -request_body_ref_in_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RefInProperty - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_ref_in_property_request_body_oapg( @typing.overload def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_ref_in_property_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRefInPropertyRequestBody(BaseApi): @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_ref_in_property_request_body( @typing.overload def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_ref_in_property_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.py index 78d8bb0262a..db344116023 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.required_default_validation import RequiredDefaultValidation -# body param -SchemaForRequestBodyApplicationJson = RequiredDefaultValidation +from .. import path +from . import response_for_200 -request_body_required_default_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RequiredDefaultValidation -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_required_default_validation_request_body_oapg( @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRequiredDefaultValidationRequestBody(BaseApi): @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_required_default_validation_request_body( @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.pyi index b290ef0c3c6..e345548d97d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RequiredDefaultValidation -request_body_required_default_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RequiredDefaultValidation - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_required_default_validation_request_body_oapg( @typing.overload def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_required_default_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRequiredDefaultValidationRequestBody(BaseApi): @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_required_default_validation_request_body( @typing.overload def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_required_default_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.py index a0149cd11b1..06b398264a2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.required_validation import RequiredValidation -# body param -SchemaForRequestBodyApplicationJson = RequiredValidation +from .. import path +from . import response_for_200 -request_body_required_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RequiredValidation -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_required_validation_request_body_oapg( @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRequiredValidationRequestBody(BaseApi): @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_required_validation_request_body( @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.pyi index 31366c3fd8b..8a702c34be0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.required_validation import RequiredValidation -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RequiredValidation -request_body_required_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RequiredValidation - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_required_validation_request_body_oapg( @typing.overload def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_required_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRequiredValidationRequestBody(BaseApi): @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_required_validation_request_body( @typing.overload def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_required_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py index 6490beb525f..ff28b4c053b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -# body param -SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray +from .. import path +from . import response_for_200 -request_body_required_with_empty_array = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RequiredWithEmptyArray -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_required_with_empty_array_request_body_oapg( @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostRequiredWithEmptyArrayRequestBody(BaseApi): @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_required_with_empty_array_request_body( @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.pyi index 828d01bed20..f5418a60cbb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray -request_body_required_with_empty_array = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = RequiredWithEmptyArray - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_required_with_empty_array_request_body_oapg( @typing.overload def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_required_with_empty_array_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostRequiredWithEmptyArrayRequestBody(BaseApi): @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_required_with_empty_array_request_body( @typing.overload def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_required_with_empty_array_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 5546b1c7222..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,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 unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # 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(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 4b9319331a9..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,321 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__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/post/__init__.py new file mode 100644 index 00000000000..169744086e0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_escaped_characters import RequiredWithEscapedCharacters + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = RequiredWithEscapedCharacters + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..603c449e446 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_escaped_characters import RequiredWithEscapedCharacters + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = RequiredWithEscapedCharacters + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py index 48ce45ab21c..77924b9fd2c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = SimpleEnumValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = SimpleEnumValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_simple_enum_validation_request_body_oapg( @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostSimpleEnumValidationRequestBody(BaseApi): @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_simple_enum_validation_request_body( @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.pyi index b0ba5e5753f..4e492fb4de4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -# body param -SchemaForRequestBodyApplicationJson = SimpleEnumValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = SimpleEnumValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_simple_enum_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostSimpleEnumValidationRequestBody(BaseApi): @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostSimpleEnumValidationRequestBody(BaseApi): @typing.overload def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_simple_enum_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py index 6db3472e65c..2d2a78c6f9f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py @@ -25,33 +25,28 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema +from .. import path +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = StringTypeMatchesStrings -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) _status_code_to_response = { - '200': _response_for_200, + '200': response_for_200.response, } @@ -59,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -94,19 +89,19 @@ def _post_string_type_matches_strings_request_body_oapg( @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -127,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,32 +159,32 @@ class PostStringTypeMatchesStringsRequestBody(BaseApi): @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -199,19 +194,19 @@ def post_string_type_matches_strings_request_body( @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -267,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.pyi index 241d59964c4..fd267337131 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.pyi @@ -25,61 +25,56 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = StringTypeMatchesStrings - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -89,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_string_type_matches_strings_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -122,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,32 +154,32 @@ class PostStringTypeMatchesStringsRequestBody(BaseApi): @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -194,19 +189,19 @@ class PostStringTypeMatchesStringsRequestBody(BaseApi): @typing.overload def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_string_type_matches_strings_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -262,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from 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 rename to 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/__init__.py index 50cbe145335..9924b6172d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py @@ -27,61 +27,59 @@ from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -# body param -SchemaForRequestBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from .. import path +from . import response_for_200 -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, -) +class RequestBody: + class Schemas: + application_json = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(Ba @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_req @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from 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 rename to 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/__init__.pyi index baaf238e68f..cd5f90d9918 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.pyi @@ -27,66 +27,54 @@ from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from . import path +from . import response_for_200 -# 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, -) +class RequestBody: + class Schemas: + application_json = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(Ba @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_req @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py index 2d9e8e8482d..e4295f3f449 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = UniqueitemsFalseValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_uniqueitems_false_validation_request_body_oapg( @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostUniqueitemsFalseValidationRequestBody(BaseApi): @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_uniqueitems_false_validation_request_body( @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.pyi index f1cb3b3ce33..e5fc9ac652c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = UniqueitemsFalseValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_uniqueitems_false_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostUniqueitemsFalseValidationRequestBody(BaseApi): @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostUniqueitemsFalseValidationRequestBody(BaseApi): @typing.overload def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_uniqueitems_false_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py index 75738c89064..9d00119ab17 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py @@ -27,33 +27,26 @@ from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from . import path +from .. import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsValidation -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = UniqueitemsValidation + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + '200': response_for_200.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _post_uniqueitems_validation_request_body_oapg( @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class PostUniqueitemsValidationRequestBody(BaseApi): @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ def post_uniqueitems_validation_request_body( @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.pyi index 471f7aa06b0..3ca3c9d4e23 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.pyi @@ -27,61 +27,54 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsValidation +from . import response_for_200 -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = UniqueitemsValidation -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_uniqueitems_validation_request_body_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +117,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +154,32 @@ class PostUniqueitemsValidationRequestBody(BaseApi): @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +189,19 @@ class PostUniqueitemsValidationRequestBody(BaseApi): @typing.overload def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_uniqueitems_validation_request_body( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +222,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +257,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 01f1e01a381..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,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 - -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(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 bd57141d4ff..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.py new file mode 100644 index 00000000000..093f62594bb --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_format import UriFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = UriFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..e9b00d89de6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_format import UriFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = UriFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 ac7b2ca12ed..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,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 - -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(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 32efe64f381..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e3ccb890410 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_reference_format import UriReferenceFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = UriReferenceFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_reference_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..78d5c544193 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_reference_format import UriReferenceFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = UriReferenceFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_reference_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 ecbb8a59927..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,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 - -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(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 c11c280ca84..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,313 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.py new file mode 100644 index 00000000000..0d6cc5b8c0d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_template_format import UriTemplateFormat + +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = UriTemplateFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_template_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/__init__.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.pyi new file mode 100644 index 00000000000..7902aced000 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.pyi @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_template_format import UriTemplateFormat + +from . import response_for_200 + + + +class RequestBody: + class Schemas: + application_json = UriTemplateFormat + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.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[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_template_format_request_body( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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[RequestBody.Schemas.application_json,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[RequestBody.Schemas.application_json,], + 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/response_for_200.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/response_for_200.py new file mode 100644 index 00000000000..ce057133be3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 2a5e71e5e09..80463b6c572 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ 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 +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_response_bo timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_response_bo timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_response_bod timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_response_bod timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 69c763dcab0..9d4ff122b65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_response_bo timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_response_bo timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_response_bod timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_response_bod timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..51d6d023dd5 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AdditionalpropertiesAllowsASchemaWhichShouldValidate + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 328985f0eed..8971cc0666c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_additionalproperties_are_allowed_by_default_response_body_for_content_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_additionalproperties_are_allowed_by_default_response_body_for_content_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_additionalproperties_are_allowed_by_default_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_additionalproperties_are_allowed_by_default_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 0ef020fde52..f6d93012190 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_additionalproperties_are_allowed_by_default_response_body_for_content_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_additionalproperties_are_allowed_by_default_response_body_for_content_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_additionalproperties_are_allowed_by_default_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_additionalproperties_are_allowed_by_default_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..5623a826f7d --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AdditionalpropertiesAreAllowedByDefault + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 02d57121925..cd1ed4c3ef7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_additionalproperties_can_exist_by_itself_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_additionalproperties_can_exist_by_itself_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_additionalproperties_can_exist_by_itself_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_additionalproperties_can_exist_by_itself_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 39b07dfedb0..cf307c760c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_additionalproperties_can_exist_by_itself_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_additionalproperties_can_exist_by_itself_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_additionalproperties_can_exist_by_itself_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_additionalproperties_can_exist_by_itself_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..007ef0529d2 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AdditionalpropertiesCanExistByItself + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 11163b1c9ed..3230754f9ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_additionalproperties_should_not_look_in_applicators_response_body_for_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_additionalproperties_should_not_look_in_applicators_response_body_for_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_additionalproperties_should_not_look_in_applicators_response_body_for_c timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_additionalproperties_should_not_look_in_applicators_response_body_for_c timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 08339309f7a..91f80628876 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_additionalproperties_should_not_look_in_applicators_response_body_for_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_additionalproperties_should_not_look_in_applicators_response_body_for_ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_additionalproperties_should_not_look_in_applicators_response_body_for_c timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_additionalproperties_should_not_look_in_applicators_response_body_for_c timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..31aee282fc4 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AdditionalpropertiesShouldNotLookInApplicators + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index a5da83b5659..00c6f047ce4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_combined_with_anyof_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_combined_with_anyof_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 8d431a16108..e602d8d41ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_combined_with_anyof_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_combined_with_anyof_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..40ad0e960d6 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofCombinedWithAnyofOneof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py index 07ec804e206..9cfb525178a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof import Allof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.pyi index f6c037767dd..136a7d1a1f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof import Allof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..18a577b40e8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = Allof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 9a539d77891..9fc1af83bb2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_simple_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_simple_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_simple_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_simple_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 77f0a396a21..01d84a97413 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_simple_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_simple_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_simple_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_simple_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce2aaa67ab2 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofSimpleTypes + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 2e942812df7..40a2737708c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 419a5d97d3e..999ec1c2260 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce573e7ee2f --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofWithBaseSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 6b727ad4f8a..6fb164266e8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 84a474e909a..58fdd7c607b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..1f0102cb7bd --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofWithOneEmptySchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index ced149513ab..e80b1452acf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_with_the_first_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_with_the_first_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index ef1b3dbf401..a1142ad8fcb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_with_the_first_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_with_the_first_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..909b883c1a1 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofWithTheFirstEmptySchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 19ed64f5a35..35633c56390 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_with_the_last_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_with_the_last_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 4abb4c3a69d..5edc17b99f0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_with_the_last_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_with_the_last_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..bcaea6d5ef0 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofWithTheLastEmptySchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 5df855bcae2..76522db4c85 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_allof_with_two_empty_schemas_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_allof_with_two_empty_schemas_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index b59cf91ebb5..d62a026fa33 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_allof_with_two_empty_schemas_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_allof_with_two_empty_schemas_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..debdab6dd57 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AllofWithTwoEmptySchemas + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 3403a986260..2e4aaaa6c62 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_anyof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_anyof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_anyof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_anyof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 4b50280b15c..2e550cfe6ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_anyof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_anyof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_anyof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_anyof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..a764d4151c2 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AnyofComplexTypes + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py index 8dfc9079cbd..86dcc8269f6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof import Anyof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.pyi index 0da1f065b45..1774a5865ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof import Anyof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..dd0ab63158c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = Anyof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index b4114d66b96..69797ff9d13 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_anyof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_anyof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_anyof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_anyof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 9eed10462f2..eb21ca6f948 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_anyof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_anyof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_anyof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_anyof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..483c291a4f8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AnyofWithBaseSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 449cf2d063b..cf1b7811c3d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_anyof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_anyof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 041597c8842..9a465a1d780 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_anyof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_anyof_with_one_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..a2abda27aff --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = AnyofWithOneEmptySchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 6a639977786..23050b20aa3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_array_type_matches_arrays_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_array_type_matches_arrays_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_array_type_matches_arrays_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_array_type_matches_arrays_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 3f8cbfe27e6..2baf4b585ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_array_type_matches_arrays_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_array_type_matches_arrays_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_array_type_matches_arrays_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_array_type_matches_arrays_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..bc3b7d74563 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = ArrayTypeMatchesArrays + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to 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/__init__.py index 8dd6262f62a..9aaaac2324c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py @@ -25,25 +25,13 @@ from unit_test_api import schemas # noqa: F401 -SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -58,7 +46,7 @@ def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -78,7 +66,7 @@ def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -136,7 +124,7 @@ def post_boolean_type_matches_booleans_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -156,7 +144,7 @@ def post_boolean_type_matches_booleans_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -186,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -206,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to 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/__init__.pyi index 030b06a8e41..38cc4bf6821 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.pyi @@ -25,30 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -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', ) @@ -63,7 +41,7 @@ def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -83,7 +61,7 @@ def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -141,7 +119,7 @@ def post_boolean_type_matches_booleans_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -161,7 +139,7 @@ def post_boolean_type_matches_booleans_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -191,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -211,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..3a6acfaf9e9 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans + + +class BodySchemas: + # body schemas + application_json = BooleanTypeMatchesBooleans + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py index 9a7bbae9361..0004a148abe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.by_int import ByInt +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_by_int_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_by_int_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_by_int_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_by_int_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.pyi index 7062ed0200e..6b8fdf3ac14 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.by_int import ByInt +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_by_int_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_by_int_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_by_int_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_by_int_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..61151943408 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = ByInt + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py index 974ac449f05..345f12c6e01 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.by_number import ByNumber +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_by_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_by_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_by_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_by_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.pyi index f6af5664d40..2b951ee6075 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.by_number import ByNumber +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_by_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_by_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_by_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_by_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..6d2b5092e10 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = ByNumber + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index ae36ecd550b..bed011c3236 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.by_small_number import BySmallNumber +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_by_small_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_by_small_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_by_small_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_by_small_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index b76bb8fbb9c..b07c2d90763 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.by_small_number import BySmallNumber +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_by_small_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_by_small_number_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_by_small_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_by_small_number_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..23d15e922bb --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = BySmallNumber + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to 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/__init__.py index c05db7d83da..d850cf591ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py @@ -25,48 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -81,7 +46,7 @@ def _post_date_time_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -101,7 +66,7 @@ def _post_date_time_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -159,7 +124,7 @@ def post_date_time_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -179,7 +144,7 @@ def post_date_time_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -209,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -229,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..055de255044 --- /dev/null +++ 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/__init__.pyi @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..45d53d38482 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.date_time_format import DateTimeFormat + + +class BodySchemas: + # body schemas + application_json = DateTimeFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py index dfa5becb7a4..7c2b75e0001 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_email_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_email_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_email_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_email_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 82% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.pyi index 852d0ec405d..b08df42e3cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_email_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_email_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_email_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_email_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..8f61992a7fa --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.email_format import EmailFormat + + +class BodySchemas: + # body schemas + application_json = EmailFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index b6dd3e24153..e8af1ba5194 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_enum_with0_does_not_match_false_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_enum_with0_does_not_match_false_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index fcaf9122bb2..871847d48db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_enum_with0_does_not_match_false_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_enum_with0_does_not_match_false_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..62f6d349915 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = EnumWith0DoesNotMatchFalse + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 3e102004f87..77190327a83 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_enum_with1_does_not_match_true_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_enum_with1_does_not_match_true_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index cf06ad29bef..cda6a71566c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_enum_with1_does_not_match_true_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_enum_with1_does_not_match_true_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..f85b7177f34 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = EnumWith1DoesNotMatchTrue + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 87ba64d4570..dd863e069b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_enum_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_enum_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 77cceb12c89..3977f10a95a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_enum_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_enum_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..c86ab458168 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = EnumWithEscapedCharacters + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 6456036913a..d05f121c31f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_enum_with_false_does_not_match0_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_enum_with_false_does_not_match0_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 7b99febc2d9..e7b641d360a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_enum_with_false_does_not_match0_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_enum_with_false_does_not_match0_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..27d14647061 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = EnumWithFalseDoesNotMatch0 + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 89feb1f1b64..e82b0ba3426 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_enum_with_true_does_not_match1_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_enum_with_true_does_not_match1_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index bf9c1ba2b10..012f3d166d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_enum_with_true_does_not_match1_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_enum_with_true_does_not_match1_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..49239ad7a9f --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = EnumWithTrueDoesNotMatch1 + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 4a050af8446..96606292c21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enums_in_properties import EnumsInProperties +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_enums_in_properties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_enums_in_properties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_enums_in_properties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_enums_in_properties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 189a0b705df..79845c4913e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.enums_in_properties import EnumsInProperties +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_enums_in_properties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_enums_in_properties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_enums_in_properties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_enums_in_properties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..f08800a887e --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = EnumsInProperties + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py index 1b146acdf45..b0644761ed0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.forbidden_property import ForbiddenProperty +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_forbidden_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_forbidden_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_forbidden_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_forbidden_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.pyi index e2b09aead36..407df4f0079 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.forbidden_property import ForbiddenProperty +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_forbidden_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_forbidden_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_forbidden_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_forbidden_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..39eb94cb942 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = ForbiddenProperty + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py index 3695f168ccf..ad785ba02c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_hostname_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_hostname_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_hostname_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_hostname_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 82% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.pyi index 1eb11280971..18992698968 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_hostname_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_hostname_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_hostname_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_hostname_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..e87e8a875e2 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.hostname_format import HostnameFormat + + +class BodySchemas: + # body schemas + application_json = HostnameFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to 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/__init__.py index b00b5c5ec8d..2081d2ee63d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py @@ -25,25 +25,13 @@ from unit_test_api import schemas # noqa: F401 -SchemaFor200ResponseBodyApplicationJson = schemas.IntSchema +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -58,7 +46,7 @@ def _post_integer_type_matches_integers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -78,7 +66,7 @@ def _post_integer_type_matches_integers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -136,7 +124,7 @@ def post_integer_type_matches_integers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -156,7 +144,7 @@ def post_integer_type_matches_integers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -186,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -206,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to 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/__init__.pyi index 1ed8a0920d9..9321b5dae92 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.pyi @@ -25,30 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -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', ) @@ -63,7 +41,7 @@ def _post_integer_type_matches_integers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -83,7 +61,7 @@ def _post_integer_type_matches_integers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -141,7 +119,7 @@ def post_integer_type_matches_integers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -161,7 +139,7 @@ def post_integer_type_matches_integers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -191,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -211,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..a1b6997aafd --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers + + +class BodySchemas: + # body schemas + application_json = IntegerTypeMatchesIntegers + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index d9e3618aad8..46171f4eaea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ 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 +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_respon timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_respon timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_respons timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_respons timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 6fe5816765a..3247b40ef03 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ 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 response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_respon timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_respon timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_respons timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_respons timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..3728fe1e8b9 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index c568b3e1302..86742b44379 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_invalid_string_value_for_default_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_invalid_string_value_for_default_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 39b0069e770..d4802e1cee8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_invalid_string_value_for_default_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_invalid_string_value_for_default_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..9768c57d542 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = InvalidStringValueForDefault + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py index 7c0f7f47cb8..5a0a25ea428 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_ipv4_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_ipv4_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_ipv4_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_ipv4_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 82% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.pyi index deb135e6eb7..7149459b24e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_ipv4_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_ipv4_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_ipv4_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_ipv4_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..29d1e63506b --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.ipv4_format import Ipv4Format + + +class BodySchemas: + # body schemas + application_json = Ipv4Format + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py index 54392bcfc37..f38b1701f1b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_ipv6_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_ipv6_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_ipv6_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_ipv6_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 82% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.pyi index 3aa10226b8d..487636a5afa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_ipv6_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_ipv6_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_ipv6_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_ipv6_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..4403c4eb95a --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.ipv6_format import Ipv6Format + + +class BodySchemas: + # body schemas + application_json = Ipv6Format + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to 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/__init__.py index 93604bb85ca..b0281ced9b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_json_pointer_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_json_pointer_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_json_pointer_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_json_pointer_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 83% rename from 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 rename to 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/__init__.pyi index c50bd665461..f755f8b4b7d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_json_pointer_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_json_pointer_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_json_pointer_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_json_pointer_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..daf4085f843 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.json_pointer_format import JsonPointerFormat + + +class BodySchemas: + # body schemas + application_json = JsonPointerFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py index 38c1592d8b7..6ae501cd243 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maximum_validation import MaximumValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_maximum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_maximum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_maximum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_maximum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.pyi index 51dcc488a82..93499d3f84e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maximum_validation import MaximumValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_maximum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_maximum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_maximum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_maximum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..a1d2b1eacd8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MaximumValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 39239b266b2..7f39795e7d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_maximum_validation_with_unsigned_integer_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_maximum_validation_with_unsigned_integer_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_maximum_validation_with_unsigned_integer_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_maximum_validation_with_unsigned_integer_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index b17d7e4eb7a..9682ad835c6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_maximum_validation_with_unsigned_integer_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_maximum_validation_with_unsigned_integer_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_maximum_validation_with_unsigned_integer_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_maximum_validation_with_unsigned_integer_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..34a4987f87b --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MaximumValidationWithUnsignedInteger + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py index 4b232322037..bec781ec9f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxitems_validation import MaxitemsValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_maxitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_maxitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_maxitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_maxitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.pyi index 131755c3710..bdb75b3b037 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxitems_validation import MaxitemsValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_maxitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_maxitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_maxitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_maxitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..18092a7c9ce --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MaxitemsValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py index 67a49cfb35e..77829651a56 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxlength_validation import MaxlengthValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_maxlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_maxlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_maxlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_maxlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.pyi index 12c48c612be..98380b44237 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxlength_validation import MaxlengthValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_maxlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_maxlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_maxlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_maxlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..9d880ef4ad8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MaxlengthValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 816491bd56c..68b8084dd24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_maxproperties0_means_the_object_is_empty_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_maxproperties0_means_the_object_is_empty_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index fe39361d422..4b7b9ece740 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_typ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_maxproperties0_means_the_object_is_empty_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_maxproperties0_means_the_object_is_empty_response_body_for_content_type timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..0f43da30405 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = Maxproperties0MeansTheObjectIsEmpty + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py index acad9a85a92..97138d8b15a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_maxproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_maxproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_maxproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_maxproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.pyi index 61ec66dfc04..02b03413fe3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_maxproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_maxproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_maxproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_maxproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..0e643c9eea2 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MaxpropertiesValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py index 482781d5794..26bfa07344a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minimum_validation import MinimumValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_minimum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_minimum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_minimum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_minimum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.pyi index e6df6196f60..db029ae1799 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minimum_validation import MinimumValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_minimum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_minimum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_minimum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_minimum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..8028e35ad19 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MinimumValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 850526fae3e..0bd7cc95e9e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_minimum_validation_with_signed_integer_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_minimum_validation_with_signed_integer_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_minimum_validation_with_signed_integer_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_minimum_validation_with_signed_integer_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index e929dbcee32..2a09a24e086 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_minimum_validation_with_signed_integer_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_minimum_validation_with_signed_integer_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_minimum_validation_with_signed_integer_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_minimum_validation_with_signed_integer_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ba593909fa8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MinimumValidationWithSignedInteger + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py index 73f91144425..72cd2a968c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minitems_validation import MinitemsValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_minitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_minitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_minitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_minitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.pyi index df08580e42e..4da47295913 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minitems_validation import MinitemsValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_minitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_minitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_minitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_minitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..be2e3095422 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MinitemsValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py index 8779b7b9b11..9195e6b500d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minlength_validation import MinlengthValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_minlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_minlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_minlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_minlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.pyi index df932cb5f10..74d119e9727 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minlength_validation import MinlengthValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_minlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_minlength_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_minlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_minlength_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..39fa8c4323c --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MinlengthValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py index 62b2572fd5a..5459c84bf5f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_minproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_minproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_minproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_minproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.pyi index fa20a29c541..3cb5af39c1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_minproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_minproperties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_minproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_minproperties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..0d78b189cec --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = MinpropertiesValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 99c4c8f7244..5a749a5e541 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_nested_allof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_nested_allof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_nested_allof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_nested_allof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 373e7db540a..f042209acc4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_nested_allof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_nested_allof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_nested_allof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_nested_allof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..b5b6898c47e --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = NestedAllofToCheckValidationSemantics + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 96c083c4b94..946b1787677 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_nested_anyof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_nested_anyof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 94d61d9b79e..4c68f7e1b97 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_nested_anyof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_nested_anyof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..3a3b071ed9a --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = NestedAnyofToCheckValidationSemantics + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py index 2869480c1d8..0c740cda726 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_items import NestedItems +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_nested_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_nested_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_nested_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_nested_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.pyi index 3bfe474ceba..ada5dac70a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_items import NestedItems +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_nested_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_nested_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_nested_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_nested_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..c3ce3db671a --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = NestedItems + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 014f023fa6e..32c90a6893b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_nested_oneof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_nested_oneof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 00dba053a14..e693853fef0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_nested_oneof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_nested_oneof_to_check_validation_semantics_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..7a99cbe36d3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = NestedOneofToCheckValidationSemantics + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__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/post/__init__.py new file mode 100644 index 00000000000..a24fafa9ee5 --- /dev/null +++ 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/__init__.py @@ -0,0 +1,215 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 +from . import response_for_200 + + +_status_code_to_response = { + '200': response_for_200.response, +} +_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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..c478e5201be --- /dev/null +++ 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/__init__.pyi @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..248d6d72dbe --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema + + +class BodySchemas: + # body schemas + application_json = NotMoreComplexSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/__init__.py index b3fc90331f3..78bd4e83be7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_not_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_not_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_not_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_not_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..ccc62c4f768 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/__init__.pyi @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..9cd3f1d4d1e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.model_not import ModelNot + + +class BodySchemas: + # body schemas + application_json = ModelNot + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index fd0d333919d..6707748ee99 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_nul_characters_in_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_nul_characters_in_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_nul_characters_in_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_nul_characters_in_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 51c0a38e329..29bd62b45e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_nul_characters_in_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_nul_characters_in_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_nul_characters_in_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_nul_characters_in_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..1603edd7cba --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = NulCharactersInStrings + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to 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/__init__.py index f8ec2c324da..e23de2ad4d6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py @@ -25,25 +25,13 @@ from unit_test_api import schemas # noqa: F401 -SchemaFor200ResponseBodyApplicationJson = schemas.NoneSchema +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -58,7 +46,7 @@ def _post_null_type_matches_only_the_null_object_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -78,7 +66,7 @@ def _post_null_type_matches_only_the_null_object_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -136,7 +124,7 @@ def post_null_type_matches_only_the_null_object_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -156,7 +144,7 @@ def post_null_type_matches_only_the_null_object_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -186,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -206,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to 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/__init__.pyi index c1e7d374a25..322bf3e29c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.pyi @@ -25,30 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -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', ) @@ -63,7 +41,7 @@ def _post_null_type_matches_only_the_null_object_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -83,7 +61,7 @@ def _post_null_type_matches_only_the_null_object_response_body_for_content_types timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -141,7 +119,7 @@ def post_null_type_matches_only_the_null_object_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -161,7 +139,7 @@ def post_null_type_matches_only_the_null_object_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -191,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -211,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..8832508e8d9 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject + + +class BodySchemas: + # body schemas + application_json = NullTypeMatchesOnlyTheNullObject + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to 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/__init__.py index 3c6fcf2bdb4..fd54910c67a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py @@ -25,25 +25,13 @@ from unit_test_api import schemas # noqa: F401 -SchemaFor200ResponseBodyApplicationJson = schemas.NumberSchema +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -58,7 +46,7 @@ def _post_number_type_matches_numbers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -78,7 +66,7 @@ def _post_number_type_matches_numbers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -136,7 +124,7 @@ def post_number_type_matches_numbers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -156,7 +144,7 @@ def post_number_type_matches_numbers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -186,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -206,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to 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/__init__.pyi index 361775d9d41..d45baabc56f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.pyi @@ -25,30 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -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', ) @@ -63,7 +41,7 @@ def _post_number_type_matches_numbers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -83,7 +61,7 @@ def _post_number_type_matches_numbers_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -141,7 +119,7 @@ def post_number_type_matches_numbers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -161,7 +139,7 @@ def post_number_type_matches_numbers_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -191,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -211,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..2d04802dfd3 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers + + +class BodySchemas: + # body schemas + application_json = NumberTypeMatchesNumbers + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index ba651953142..ec10c929e9c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_object_properties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_object_properties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_object_properties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_object_properties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 4769ba021d8..8118d4d3e5f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_object_properties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_object_properties_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_object_properties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_object_properties_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..8aa3746856c --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = ObjectPropertiesValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to 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/__init__.py index a536bf84d02..f395ed5ec9a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py @@ -25,25 +25,13 @@ from unit_test_api import schemas # noqa: F401 -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -58,7 +46,7 @@ def _post_object_type_matches_objects_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -78,7 +66,7 @@ def _post_object_type_matches_objects_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -136,7 +124,7 @@ def post_object_type_matches_objects_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -156,7 +144,7 @@ def post_object_type_matches_objects_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -186,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -206,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to 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/__init__.pyi index 40644049039..25a89b7512c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.pyi @@ -25,30 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -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', ) @@ -63,7 +41,7 @@ def _post_object_type_matches_objects_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -83,7 +61,7 @@ def _post_object_type_matches_objects_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -141,7 +119,7 @@ def post_object_type_matches_objects_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -161,7 +139,7 @@ def post_object_type_matches_objects_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -191,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -211,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..154b26cf30a --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_type_matches_objects import ObjectTypeMatchesObjects + + +class BodySchemas: + # body schemas + application_json = ObjectTypeMatchesObjects + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 13fc378b54c..fa78cabae63 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_oneof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_oneof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_oneof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_oneof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index ab4917e7cb1..1342e3d8511 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_oneof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_oneof_complex_types_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_oneof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_oneof_complex_types_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..30c5dd452e9 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = OneofComplexTypes + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py index 63bc2cb122f..b2b3ab19bae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof import Oneof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.pyi index a109b7c7af2..3f96b36be1c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof import Oneof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..0b1f0868c17 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = Oneof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 086dd1a6e3d..ce1d60b49c4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_oneof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_oneof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_oneof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_oneof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 1dfca4c3938..4f1cdc52ccb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_oneof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_oneof_with_base_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_oneof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_oneof_with_base_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..9fcc30ebafe --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = OneofWithBaseSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index db4e55b94fc..1dfbdfd82d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_oneof_with_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_oneof_with_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index d91a02eeb70..b83e8145c4d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_oneof_with_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_oneof_with_empty_schema_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..5785cf33993 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = OneofWithEmptySchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index f90b79612ce..96f15d5c3ae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_with_required import OneofWithRequired +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_oneof_with_required_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_oneof_with_required_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_oneof_with_required_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_oneof_with_required_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 18af4cfe7b0..dcb6c9f5f08 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.oneof_with_required import OneofWithRequired +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_oneof_with_required_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_oneof_with_required_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_oneof_with_required_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_oneof_with_required_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..6471d18a272 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = OneofWithRequired + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index c1cc91c88ca..1e80a4a80de 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_pattern_is_not_anchored_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_pattern_is_not_anchored_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index bef8879c1d6..3bd8f574f49 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_pattern_is_not_anchored_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_pattern_is_not_anchored_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..5c4258d4607 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = PatternIsNotAnchored + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py index 589121a113c..e4db0c0f0bd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.pattern_validation import PatternValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_pattern_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_pattern_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_pattern_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_pattern_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.pyi index f267935d147..51e67b0d542 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.pattern_validation import PatternValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_pattern_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_pattern_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_pattern_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_pattern_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..581d93e78cf --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = PatternValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index a2f57446fd3..862395cbd3a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_properties_with_escaped_characters_response_body_for_content_types_oap timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_properties_with_escaped_characters_response_body_for_content_types_oap timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_properties_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_properties_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 8bf1bdca885..ad47668bafd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_properties_with_escaped_characters_response_body_for_content_types_oap timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_properties_with_escaped_characters_response_body_for_content_types_oap timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_properties_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_properties_with_escaped_characters_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..7d00aa456f7 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = PropertiesWithEscapedCharacters + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index e6c1333f5c9..f25bd9a6d8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ 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 +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_property_named_ref_that_is_not_a_reference_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_property_named_ref_that_is_not_a_reference_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 7bd5d81fe11..75b36f86ab1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ 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 response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_t timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_property_named_ref_that_is_not_a_reference_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_property_named_ref_that_is_not_a_reference_response_body_for_content_ty timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..d952359e473 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 BodySchemas: + # body schemas + application_json = PropertyNamedRefThatIsNotAReference + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 0bb91ff44c1..9f3eded8a1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_ref_in_additionalproperties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_ref_in_additionalproperties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index e7d5c5eca61..a97f1340bb0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_ref_in_additionalproperties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_ref_in_additionalproperties_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..1eff82b3ddc --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RefInAdditionalproperties + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 211f9ff8d28..6a796b0b4cc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_allof import RefInAllof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_ref_in_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_ref_in_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_ref_in_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_ref_in_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index cd8bf5b5070..a065b8b6499 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_allof import RefInAllof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_ref_in_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_ref_in_allof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_ref_in_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_ref_in_allof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..5dd4cfec489 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RefInAllof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 2fbc6af0e12..f4fb3e6894b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_anyof import RefInAnyof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_ref_in_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_ref_in_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_ref_in_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_ref_in_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index c28733f77b3..fd0eaeb32ff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_anyof import RefInAnyof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_ref_in_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_ref_in_anyof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_ref_in_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_ref_in_anyof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..1fca69d9717 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RefInAnyof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index eab5a6d5a4e..5780c95c68b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_items import RefInItems +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_ref_in_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_ref_in_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_ref_in_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_ref_in_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 77c23bc9faf..1a92245e3f0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_items import RefInItems +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_ref_in_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_ref_in_items_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_ref_in_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_ref_in_items_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..a9807479bd8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RefInItems + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__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/post/__init__.py new file mode 100644 index 00000000000..01dd6396a35 --- /dev/null +++ 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/__init__.py @@ -0,0 +1,215 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 +from . import response_for_200 + + +_status_code_to_response = { + '200': response_for_200.response, +} +_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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..1de3a06e9d4 --- /dev/null +++ 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/__init__.pyi @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..3c14196976f --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_not import RefInNot + + +class BodySchemas: + # body schemas + application_json = RefInNot + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 53f46629860..9334cd23ef6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_oneof import RefInOneof +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_ref_in_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_ref_in_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_ref_in_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_ref_in_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 2ed178a49d9..70a4bdbcbc2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_oneof import RefInOneof +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_ref_in_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_ref_in_oneof_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_ref_in_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_ref_in_oneof_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..5026c9179f8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RefInOneof + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 974eb70c891..f678d8d6dfc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_property import RefInProperty +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_ref_in_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_ref_in_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_ref_in_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_ref_in_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index ed51fd0f79b..26ede3639b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.ref_in_property import RefInProperty +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_ref_in_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_ref_in_property_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_ref_in_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_ref_in_property_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..aeae8175360 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RefInProperty + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 977571b091f..1ec31a11b75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_required_default_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_required_default_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_required_default_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_required_default_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 2c1e9db6462..4f3aa8b16a0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_required_default_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_required_default_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_required_default_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_required_default_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..1bbd3ad8050 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RequiredDefaultValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py index 17454c7031c..7291193a613 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.required_validation import RequiredValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_required_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_required_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_required_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_required_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.pyi index d30d66adfde..3d25deebe25 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.required_validation import RequiredValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_required_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_required_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_required_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_required_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..f88c0c855f8 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RequiredValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index 3c36cc22f5c..e45b6dc33f8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_required_with_empty_array_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_required_with_empty_array_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_required_with_empty_array_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_required_with_empty_array_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index c951da515a9..5f88aca1e4e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_required_with_empty_array_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_required_with_empty_array_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_required_with_empty_array_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_required_with_empty_array_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..baac7b93b4b --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = RequiredWithEmptyArray + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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 654dea6b470..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,257 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import 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(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/__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/post/__init__.py new file mode 100644 index 00000000000..9bc96a33109 --- /dev/null +++ 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/__init__.py @@ -0,0 +1,215 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 +from . import response_for_200 + + +_status_code_to_response = { + '200': response_for_200.response, +} +_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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/__init__.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/__init__.pyi new file mode 100644 index 00000000000..243cff48c97 --- /dev/null +++ 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/__init__.pyi @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # 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 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + accept_content_types: typing.Tuple[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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..b97f8b3a774 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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_escaped_characters import RequiredWithEscapedCharacters + + +class BodySchemas: + # body schemas + application_json = RequiredWithEscapedCharacters + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index e8cbae9b39c..f98fc8a32aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_simple_enum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_simple_enum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_simple_enum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_simple_enum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 98f48905197..766a8c90c59 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_simple_enum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_simple_enum_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_simple_enum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_simple_enum_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..821ee4a9745 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = SimpleEnumValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 91% rename from 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 rename to 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/__init__.py index 54bc07baa99..4dbb61aa941 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py @@ -25,25 +25,13 @@ from unit_test_api import schemas # noqa: F401 -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -58,7 +46,7 @@ def _post_string_type_matches_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -78,7 +66,7 @@ def _post_string_type_matches_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -136,7 +124,7 @@ def post_string_type_matches_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -156,7 +144,7 @@ def post_string_type_matches_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -186,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -206,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 90% rename from 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 rename to 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/__init__.pyi index 690aca6f91d..0641475411c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.pyi @@ -25,30 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -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', ) @@ -63,7 +41,7 @@ def _post_string_type_matches_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -83,7 +61,7 @@ def _post_string_type_matches_strings_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -141,7 +119,7 @@ def post_string_type_matches_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -161,7 +139,7 @@ def post_string_type_matches_strings_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -191,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -211,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..f181e246e29 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings + + +class BodySchemas: + # body schemas + application_json = StringTypeMatchesStrings + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 89% rename from 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 rename to 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/__init__.py index 12593d9a33c..18248df72c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ 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 +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_res timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_res timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index f84c021f89f..5328ab0d299 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ 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 response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_res timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_res timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..b293aca06b1 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to 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/__init__.py index c38e6e9c334..497762408c7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_uniqueitems_false_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_uniqueitems_false_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to 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/__init__.pyi index 6c00ce1445f..a189f6d307c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_uniqueitems_false_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_uniqueitems_false_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..89956d6f341 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = UniqueitemsFalseValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 90% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py index 5d7a775bebc..d91eaac6e22 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py @@ -25,27 +25,13 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _post_uniqueitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _post_uniqueitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +124,7 @@ def post_uniqueitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +144,7 @@ def post_uniqueitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.pyi index b8c53f797bd..53182b34abb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.pyi @@ -25,32 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _post_uniqueitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _post_uniqueitems_validation_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +119,7 @@ def post_uniqueitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +139,7 @@ def post_uniqueitems_validation_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..85ea5c4ec74 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_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 + + +class BodySchemas: + # body schemas + application_json = UniqueitemsValidation + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py index 119a9678d7b..5a40cb5e626 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_uri_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_uri_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_uri_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_uri_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 82% rename from 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 rename to samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.pyi index 5049eb56e95..9edab25419c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_uri_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_uri_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_uri_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_uri_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..ce8690e487c --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_format import UriFormat + + +class BodySchemas: + # body schemas + application_json = UriFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to 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/__init__.py index 985665f5486..29b04783d3f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_uri_reference_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_uri_reference_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_uri_reference_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_uri_reference_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 83% rename from 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 rename to 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/__init__.pyi index 65ecca6b552..41e7160464e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_uri_reference_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_uri_reference_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_uri_reference_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_uri_reference_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..6eb9c2351b9 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_reference_format import UriReferenceFormat + + +class BodySchemas: + # body schemas + application_json = UriReferenceFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 83% rename from 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 rename to 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/__init__.py index 7d1760c1b73..f65e033589f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py @@ -25,47 +25,13 @@ from unit_test_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,7 +46,7 @@ def _post_uri_template_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -100,7 +66,7 @@ def _post_uri_template_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -158,7 +124,7 @@ def post_uri_template_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -178,7 +144,7 @@ def post_uri_template_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -208,7 +174,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -228,7 +194,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 83% rename from 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 rename to 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/__init__.pyi index 52dcf6763da..4f24c328f6e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.pyi @@ -25,52 +25,8 @@ from unit_test_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -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', ) @@ -85,7 +41,7 @@ def _post_uri_template_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -105,7 +61,7 @@ def _post_uri_template_format_response_body_for_content_types_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -163,7 +119,7 @@ def post_uri_template_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -183,7 +139,7 @@ def post_uri_template_format_response_body_for_content_types( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -213,7 +169,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -233,7 +189,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/response_for_200.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/response_for_200.py new file mode 100644 index 00000000000..7dffeb92126 --- /dev/null +++ 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/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from unit_test_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from unit_test_api import schemas # noqa: F401 + +from unit_test_api.model.uri_template_format import UriTemplateFormat + + +class BodySchemas: + # body schemas + application_json = UriTemplateFormat + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md index b361ea6af0e..577c0e64e56 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md @@ -48,7 +48,7 @@ with this_package.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, Unset] | optional, default is unset | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -56,7 +56,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Operator**](../../models/Operator.md) | | diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/api_client.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/api_client.py index 385e43821b8..1677291f391 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/api_client.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/api_client.py @@ -8,7 +8,7 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass +import dataclasses from decimal import Decimal import enum import email @@ -343,7 +343,7 @@ def _content_type_is_json(cls, content_type: str) -> bool: return False -@dataclass +@dataclasses.dataclass class ParameterBase(JSONDetector): name: str in_type: ParameterInType @@ -783,7 +783,7 @@ def __init__( self.allow_reserved = allow_reserved -@dataclass +@dataclasses.dataclass class MediaType: """ Used to store request and response body schema information @@ -797,7 +797,7 @@ class MediaType: encoding: typing.Optional[typing.Dict[str, Encoding]] = None -@dataclass +@dataclasses.dataclass class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] @@ -806,8 +806,8 @@ class ApiResponse: def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]], - headers: typing.Union[Unset, typing.List[HeaderParameter]] + body: typing.Union[Unset, typing.Type[Schema]] = unset, + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -817,7 +817,7 @@ def __init__( self.headers = headers -@dataclass +@dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse body: typing.Union[Unset, typing.Type[Schema]] = unset diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post.pyi b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/__init__.py similarity index 76% rename from samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post.pyi rename to samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/__init__.py index 3c4515d0d82..e02bf809a11 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post.pyi +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/__init__.py @@ -27,28 +27,26 @@ from this_package.model.operator import Operator -# body param -SchemaForRequestBodyApplicationJson = Operator +from .. import path +from . import response_for_200 -request_body_operator = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) +class RequestBody: + class Schemas: + application_json = Operator -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @@ -56,24 +54,24 @@ class BaseApi(api_client.Api): def _post_operators_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_operators_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @@ -82,7 +80,7 @@ def _post_operators_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -91,19 +89,19 @@ def _post_operators_oapg( def _post_operators_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_operators_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -121,7 +119,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_operator.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -159,24 +157,24 @@ class PostOperators(BaseApi): def post_operators( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post_operators( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @@ -185,7 +183,7 @@ def post_operators( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -194,19 +192,19 @@ def post_operators( def post_operators( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_operators( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -227,24 +225,24 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @@ -253,7 +251,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -262,19 +260,19 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/__init__.pyi similarity index 76% rename from samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post.py rename to samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/__init__.pyi index e6ec8da5ab5..94e55528f7e 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/__init__.pyi @@ -27,33 +27,21 @@ from this_package.model.operator import Operator -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = Operator -request_body_operator = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) +class RequestBody: + class Schemas: + application_json = Operator - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) class BaseApi(api_client.Api): @@ -61,24 +49,24 @@ class BaseApi(api_client.Api): def _post_operators_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _post_operators_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @@ -87,7 +75,7 @@ def _post_operators_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -96,19 +84,19 @@ def _post_operators_oapg( def _post_operators_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _post_operators_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -126,7 +114,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_operator.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -164,24 +152,24 @@ class PostOperators(BaseApi): def post_operators( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post_operators( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @@ -190,7 +178,7 @@ def post_operators( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -199,19 +187,19 @@ def post_operators( def post_operators( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post_operators( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -232,24 +220,24 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, 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, + response_for_200.ApiResponse, ]: ... @@ -258,7 +246,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -267,19 +255,19 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/response_for_200.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/response_for_200.py new file mode 100644 index 00000000000..e0baa88e632 --- /dev/null +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from this_package import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from this_package import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md index 2a76dabc358..111e3aa98a4 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md @@ -50,7 +50,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -59,7 +59,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -76,10 +76,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.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 index 768d80a1c35..c569948e285 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md @@ -18,7 +18,6 @@ Method | HTTP request | Description ```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. @@ -52,10 +51,10 @@ default | [ApiResponseForDefault](#foo_get.ApiResponseForDefault) | response Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor0ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index e8690102866..c9ef74cb3b8 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -82,7 +82,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -91,7 +91,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -108,10 +108,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -165,7 +165,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -174,7 +174,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -191,10 +191,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -247,7 +247,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -256,7 +256,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -273,10 +273,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -334,7 +334,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -342,7 +342,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**FileSchemaTestClass**](../../models/FileSchemaTestClass.md) | | @@ -423,7 +423,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -432,7 +432,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -475,7 +475,7 @@ No authorization required # **boolean** -> bool boolean() +> Boolean boolean() @@ -486,6 +486,7 @@ Test serialization of outer boolean types ```python import petstore_api from petstore_api.apis.tags import fake_api +from petstore_api.model.boolean import Boolean 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. @@ -499,7 +500,7 @@ with petstore_api.ApiClient(configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = True + body = Boolean(True) try: api_response = api_instance.boolean( body=body, @@ -512,7 +513,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -521,12 +522,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Boolean**](../../models/Boolean.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Return Types, Responses @@ -539,15 +539,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**Boolean**](../../models/Boolean.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | ### Authorization @@ -696,7 +695,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -705,7 +704,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -722,10 +721,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -777,7 +776,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -786,7 +785,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -803,10 +802,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -971,7 +970,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +body | typing.Union[application/x-www-form-urlencoded, 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 @@ -979,7 +978,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationXWwwFormUrlencoded +# application/x-www-form-urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1093,7 +1092,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +body | typing.Union[application/x-www-form-urlencoded, 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 @@ -1103,7 +1102,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationXWwwFormUrlencoded +# application/x-www-form-urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1241,7 +1240,6 @@ Health check endpoint ```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. @@ -1276,10 +1274,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**HealthCheckResult**](../../models/HealthCheckResult.md) | | @@ -1493,7 +1491,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -1501,7 +1499,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1578,7 +1576,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +body | typing.Union[application/json, multipart/form-data, 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 @@ -1588,7 +1586,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1608,7 +1606,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# SchemaForRequestBodyMultipartFormData +# multipart/form-data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1714,10 +1712,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, SchemaFor200ResponseBodyMultipartFormData, ] | | +body | typing.Union[application/json, multipart/form-data, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1737,7 +1735,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# SchemaFor200ResponseBodyMultipartFormData +# multipart/form-data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1816,7 +1814,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +body | typing.Union[application/x-www-form-urlencoded, 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 @@ -1824,7 +1822,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationXWwwFormUrlencoded +# application/x-www-form-urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1900,7 +1898,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, Unset] | optional, default is unset | +body | typing.Union[application/json-patch+json, 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 @@ -1908,7 +1906,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJsonPatchjson +# application/json-patch+json Type | Description | Notes ------------- | ------------- | ------------- [**JSONPatchRequest**](../../models/JSONPatchRequest.md) | | @@ -1972,7 +1970,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, Unset] | optional, default is unset | +body | typing.Union[application/json; charset=utf-8, 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 @@ -1981,7 +1979,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJsonCharsetutf8 +# application/json; charset=utf-8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1999,10 +1997,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJsonCharsetutf8, ] | | +body | typing.Union[application/json; charset=utf-8, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJsonCharsetutf8 +# application/json; charset=utf-8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2059,7 +2057,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -2068,7 +2066,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -2085,10 +2083,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -2140,7 +2138,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -2149,7 +2147,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2166,10 +2164,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2297,8 +2295,8 @@ with petstore_api.ApiClient(configuration) as api_client: # example passing only optional values body = ObjectModelWithRefProps( my_number=NumberWithValidations(10), - my_string="my_string_example", - my_boolean=True, + my_string=String("my_string_example"), + my_boolean=Boolean(True), ) try: api_response = api_instance.object_model_with_ref_props( @@ -2312,7 +2310,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -2321,7 +2319,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2338,10 +2336,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2448,7 +2446,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, Unset] | optional, default is unset | query_params | RequestQueryParams | | header_params | RequestHeaderParams | | path_params | RequestPathParams | | @@ -2461,7 +2459,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2656,10 +2654,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2737,10 +2735,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2940,7 +2938,7 @@ with petstore_api.ApiClient(configuration) as api_client: # example passing only optional values query_params = { 'mapBean': Foo( - bar="bar", + bar=Bar("bar"), ), } try: @@ -3049,7 +3047,7 @@ No authorization required # **string** -> str string() +> String string() @@ -3060,6 +3058,7 @@ Test serialization of outer string types ```python import petstore_api from petstore_api.apis.tags import fake_api +from petstore_api.model.string import String 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. @@ -3073,7 +3072,7 @@ with petstore_api.ApiClient(configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = "body_example" + body = String("body_example") try: api_response = api_instance.string( body=body, @@ -3086,7 +3085,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -3095,12 +3094,11 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**String**](../../models/String.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Return Types, Responses @@ -3113,15 +3111,14 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json +Type | Description | Notes +------------- | ------------- | ------------- +[**String**](../../models/String.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | ### Authorization @@ -3169,7 +3166,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +body | typing.Union[application/json, 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 @@ -3178,7 +3175,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3195,10 +3192,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3248,7 +3245,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationOctetStream] | required | +body | typing.Union[application/octet-stream] | 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 @@ -3257,7 +3254,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationOctetStream +# application/octet-stream file to upload @@ -3277,10 +3274,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | +body | typing.Union[application/octet-stream, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationOctetStream +# application/octet-stream file to download @@ -3306,7 +3303,6 @@ uploads a file using multipart/form-data ```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. @@ -3337,7 +3333,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +body | typing.Union[multipart/form-data, 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 @@ -3346,7 +3342,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyMultipartFormData +# multipart/form-data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -3371,10 +3367,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.md) | | @@ -3397,7 +3393,6 @@ uploads files using multipart/form-data ```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. @@ -3429,7 +3424,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +body | typing.Union[multipart/form-data, 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 @@ -3438,7 +3433,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyMultipartFormData +# multipart/form-data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -3474,10 +3469,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.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 index 87b99456ada..710431645a4 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md @@ -61,7 +61,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -70,7 +70,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -87,10 +87,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.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 index a295a0d499b..53535817f95 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -143,7 +143,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml] | required | +body | typing.Union[application/json, application/xml] | 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 @@ -152,13 +152,13 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# SchemaForRequestBodyApplicationXml +# application/xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -329,7 +329,6 @@ Multiple status values can be provided with comma separated strings ```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. @@ -469,10 +468,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationXml +# application/xml ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -484,7 +483,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -523,7 +522,6 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```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. @@ -663,10 +661,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationXml +# application/xml ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -678,7 +676,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -717,7 +715,6 @@ Returns a single pet ```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. @@ -790,16 +787,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationXml +# application/xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -951,7 +948,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml] | required | +body | typing.Union[application/json, application/xml] | 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 @@ -960,13 +957,13 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# SchemaForRequestBodyApplicationXml +# application/xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -1075,7 +1072,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +body | typing.Union[application/x-www-form-urlencoded, 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 @@ -1084,7 +1081,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationXWwwFormUrlencoded +# application/x-www-form-urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1144,7 +1141,6 @@ uploads an image (required) ```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. @@ -1202,7 +1198,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +body | typing.Union[multipart/form-data, 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 @@ -1212,7 +1208,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyMultipartFormData +# multipart/form-data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1251,10 +1247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.md) | | @@ -1278,7 +1274,6 @@ uploads an image ```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. @@ -1336,7 +1331,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +body | typing.Union[multipart/form-data, 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 @@ -1346,7 +1341,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyMultipartFormData +# multipart/form-data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1385,10 +1380,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.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 index a75abbcffc0..082b1984718 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -156,10 +156,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -190,7 +190,6 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ```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. @@ -253,16 +252,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationXml +# application/xml Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | @@ -334,7 +333,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -343,7 +342,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | @@ -361,16 +360,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationXml +# application/xml Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.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 index 6b0fd83c5db..c8665f5ce97 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -68,7 +68,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -76,7 +76,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -156,7 +156,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -164,7 +164,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -250,7 +250,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -258,7 +258,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -389,7 +389,6 @@ Get user by user name ```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. @@ -452,16 +451,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationXml +# application/xml Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | -# SchemaFor200ResponseBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -569,17 +568,17 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +body | typing.Union[application/xml, application/json, ] | | headers | ResponseHeadersFor200 | | -# SchemaFor200ResponseBodyApplicationXml +# application/xml ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# SchemaFor200ResponseBodyApplicationJson +# application/json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -735,7 +734,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +body | typing.Union[application/json] | 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 @@ -744,7 +743,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# SchemaForRequestBodyApplicationJson +# application/json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | diff --git a/samples/openapi3/client/petstore/python/docs/models/Foo.md b/samples/openapi3/client/petstore/python/docs/models/Foo.md index 5ea8d33d369..a7accdf8874 100644 --- a/samples/openapi3/client/petstore/python/docs/models/Foo.md +++ b/samples/openapi3/client/petstore/python/docs/models/Foo.md @@ -8,7 +8,7 @@ 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" +**bar** | [**Bar**](Bar.md) | [**Bar**](Bar.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/ObjectModelWithRefProps.md b/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md index 8bb001aa771..6fe20b1c886 100644 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md +++ b/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md @@ -11,8 +11,8 @@ dict, frozendict.frozendict, | frozendict.frozendict, | a model that includes Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- **myNumber** | [**NumberWithValidations**](NumberWithValidations.md) | [**NumberWithValidations**](NumberWithValidations.md) | | [optional] -**myString** | str, | str, | | [optional] -**myBoolean** | bool, | BoolClass, | | [optional] +**myString** | [**String**](String.md) | [**String**](String.md) | | [optional] +**myBoolean** | [**Boolean**](Boolean.md) | [**Boolean**](Boolean.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/ObjectWithDecimalProperties.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md index 82c1abadd60..dc1e9cd6d53 100644 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md +++ b/samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md @@ -8,7 +8,7 @@ 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 +**length** | [**DecimalPayload**](DecimalPayload.md) | [**DecimalPayload**](DecimalPayload.md) | | [optional] **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] diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index d1b93ab5a68..ace72897b46 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -8,7 +8,7 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass +import dataclasses from decimal import Decimal import enum import email @@ -343,7 +343,7 @@ def _content_type_is_json(cls, content_type: str) -> bool: return False -@dataclass +@dataclasses.dataclass class ParameterBase(JSONDetector): name: str in_type: ParameterInType @@ -783,7 +783,7 @@ def __init__( self.allow_reserved = allow_reserved -@dataclass +@dataclasses.dataclass class MediaType: """ Used to store request and response body schema information @@ -797,7 +797,7 @@ class MediaType: encoding: typing.Optional[typing.Dict[str, Encoding]] = None -@dataclass +@dataclasses.dataclass class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] @@ -806,8 +806,8 @@ class ApiResponse: def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]], - headers: typing.Union[Unset, typing.List[HeaderParameter]] + body: typing.Union[Unset, typing.Type[Schema]] = unset, + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -817,7 +817,7 @@ def __init__( self.headers = headers -@dataclass +@dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse body: typing.Union[Unset, typing.Type[Schema]] = unset diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py index ce7d00afa0a..c8bc70e74ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py @@ -36,13 +36,16 @@ class Foo( class MetaOapg: class properties: - bar = schemas.StrSchema + + @staticmethod + def bar() -> typing.Type['Bar']: + return Bar __annotations__ = { "bar": bar, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... + def __getitem__(self, name: typing_extensions.Literal["bar"]) -> 'Bar': ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... @@ -53,7 +56,7 @@ def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union['Bar', schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... @@ -65,7 +68,7 @@ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], s def __new__( cls, *args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, + bar: typing.Union['Bar', 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': @@ -76,3 +79,5 @@ def __new__( _configuration=_configuration, **kwargs, ) + +from petstore_api.model.bar import Bar diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi index ce7d00afa0a..c8bc70e74ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi @@ -36,13 +36,16 @@ class Foo( class MetaOapg: class properties: - bar = schemas.StrSchema + + @staticmethod + def bar() -> typing.Type['Bar']: + return Bar __annotations__ = { "bar": bar, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... + def __getitem__(self, name: typing_extensions.Literal["bar"]) -> 'Bar': ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... @@ -53,7 +56,7 @@ class Foo( @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union['Bar', schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... @@ -65,7 +68,7 @@ class Foo( def __new__( cls, *args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, + bar: typing.Union['Bar', 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': @@ -76,3 +79,5 @@ class Foo( _configuration=_configuration, **kwargs, ) + +from petstore_api.model.bar import Bar 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 index e68caff8717..b3ab14ba2d5 100644 --- 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 @@ -42,8 +42,14 @@ class properties: @staticmethod def myNumber() -> typing.Type['NumberWithValidations']: return NumberWithValidations - myString = schemas.StrSchema - myBoolean = schemas.BoolSchema + + @staticmethod + def myString() -> typing.Type['String']: + return String + + @staticmethod + def myBoolean() -> typing.Type['Boolean']: + return Boolean __annotations__ = { "myNumber": myNumber, "myString": myString, @@ -54,10 +60,10 @@ def myNumber() -> typing.Type['NumberWithValidations']: def __getitem__(self, name: typing_extensions.Literal["myNumber"]) -> 'NumberWithValidations': ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myString"]) -> MetaOapg.properties.myString: ... + def __getitem__(self, name: typing_extensions.Literal["myString"]) -> 'String': ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myBoolean"]) -> MetaOapg.properties.myBoolean: ... + def __getitem__(self, name: typing_extensions.Literal["myBoolean"]) -> 'Boolean': ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... @@ -71,10 +77,10 @@ def __getitem__(self, name: typing.Union[typing_extensions.Literal["myNumber", " 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]: ... + def get_item_oapg(self, name: typing_extensions.Literal["myString"]) -> typing.Union['String', schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myBoolean"]) -> typing.Union[MetaOapg.properties.myBoolean, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["myBoolean"]) -> typing.Union['Boolean', schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... @@ -87,8 +93,8 @@ 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, + myString: typing.Union['String', schemas.Unset] = schemas.unset, + myBoolean: typing.Union['Boolean', 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': @@ -102,4 +108,6 @@ def __new__( **kwargs, ) +from petstore_api.model.boolean import Boolean from petstore_api.model.number_with_validations import NumberWithValidations +from petstore_api.model.string import String 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 index e68caff8717..b3ab14ba2d5 100644 --- 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 @@ -42,8 +42,14 @@ class ObjectModelWithRefProps( @staticmethod def myNumber() -> typing.Type['NumberWithValidations']: return NumberWithValidations - myString = schemas.StrSchema - myBoolean = schemas.BoolSchema + + @staticmethod + def myString() -> typing.Type['String']: + return String + + @staticmethod + def myBoolean() -> typing.Type['Boolean']: + return Boolean __annotations__ = { "myNumber": myNumber, "myString": myString, @@ -54,10 +60,10 @@ class ObjectModelWithRefProps( def __getitem__(self, name: typing_extensions.Literal["myNumber"]) -> 'NumberWithValidations': ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myString"]) -> MetaOapg.properties.myString: ... + def __getitem__(self, name: typing_extensions.Literal["myString"]) -> 'String': ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myBoolean"]) -> MetaOapg.properties.myBoolean: ... + def __getitem__(self, name: typing_extensions.Literal["myBoolean"]) -> 'Boolean': ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... @@ -71,10 +77,10 @@ class ObjectModelWithRefProps( 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]: ... + def get_item_oapg(self, name: typing_extensions.Literal["myString"]) -> typing.Union['String', schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myBoolean"]) -> typing.Union[MetaOapg.properties.myBoolean, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["myBoolean"]) -> typing.Union['Boolean', schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... @@ -87,8 +93,8 @@ class ObjectModelWithRefProps( 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, + myString: typing.Union['String', schemas.Unset] = schemas.unset, + myBoolean: typing.Union['Boolean', 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': @@ -102,4 +108,6 @@ class ObjectModelWithRefProps( **kwargs, ) +from petstore_api.model.boolean import Boolean from petstore_api.model.number_with_validations import NumberWithValidations +from petstore_api.model.string import String 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 index 068f21457bc..20d1a1e18ca 100644 --- 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 @@ -36,7 +36,10 @@ class ObjectWithDecimalProperties( class MetaOapg: class properties: - length = schemas.DecimalSchema + + @staticmethod + def length() -> typing.Type['DecimalPayload']: + return DecimalPayload width = schemas.DecimalSchema @staticmethod @@ -49,7 +52,7 @@ def cost() -> typing.Type['Money']: } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["length"]) -> MetaOapg.properties.length: ... + def __getitem__(self, name: typing_extensions.Literal["length"]) -> 'DecimalPayload': ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... @@ -66,7 +69,7 @@ def __getitem__(self, name: typing.Union[typing_extensions.Literal["length", "wi @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["length"]) -> typing.Union[MetaOapg.properties.length, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["length"]) -> typing.Union['DecimalPayload', schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["width"]) -> typing.Union[MetaOapg.properties.width, schemas.Unset]: ... @@ -84,7 +87,7 @@ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["length", " def __new__( cls, *args: typing.Union[dict, frozendict.frozendict, ], - length: typing.Union[MetaOapg.properties.length, str, schemas.Unset] = schemas.unset, + length: typing.Union['DecimalPayload', 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, @@ -100,4 +103,5 @@ def __new__( **kwargs, ) +from petstore_api.model.decimal_payload import DecimalPayload 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 index 068f21457bc..20d1a1e18ca 100644 --- 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 @@ -36,7 +36,10 @@ class ObjectWithDecimalProperties( class MetaOapg: class properties: - length = schemas.DecimalSchema + + @staticmethod + def length() -> typing.Type['DecimalPayload']: + return DecimalPayload width = schemas.DecimalSchema @staticmethod @@ -49,7 +52,7 @@ class ObjectWithDecimalProperties( } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["length"]) -> MetaOapg.properties.length: ... + def __getitem__(self, name: typing_extensions.Literal["length"]) -> 'DecimalPayload': ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... @@ -66,7 +69,7 @@ class ObjectWithDecimalProperties( @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["length"]) -> typing.Union[MetaOapg.properties.length, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["length"]) -> typing.Union['DecimalPayload', schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["width"]) -> typing.Union[MetaOapg.properties.width, schemas.Unset]: ... @@ -84,7 +87,7 @@ class ObjectWithDecimalProperties( def __new__( cls, *args: typing.Union[dict, frozendict.frozendict, ], - length: typing.Union[MetaOapg.properties.length, str, schemas.Unset] = schemas.unset, + length: typing.Union['DecimalPayload', 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, @@ -100,4 +103,5 @@ class ObjectWithDecimalProperties( **kwargs, ) +from petstore_api.model.decimal_payload import DecimalPayload from petstore_api.model.money import Money 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/__init__.py similarity index 81% rename from samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py index 5c7dfa48515..cc0b963ae49 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py @@ -27,36 +27,27 @@ from petstore_api.model.client import Client -# body param -SchemaForRequestBodyApplicationJson = Client +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = Client + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,34 +57,34 @@ class BaseApi(api_client.Api): @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -104,20 +95,20 @@ def _call_123_test_special_tags_oapg( @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -143,7 +134,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -180,34 +171,34 @@ class Call123TestSpecialTags(BaseApi): @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -218,20 +209,20 @@ def call_123_test_special_tags( @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -254,34 +245,34 @@ class ApiForpatch(BaseApi): @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -292,20 +283,20 @@ def patch( @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi index 35b18c4fde2..dd08623d0c0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi @@ -27,41 +27,22 @@ from petstore_api.model.client import Client -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = Client - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,34 +52,34 @@ class BaseApi(api_client.Api): @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -109,20 +90,20 @@ def _call_123_test_special_tags_oapg( @typing.overload def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _call_123_test_special_tags_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -148,7 +129,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -185,34 +166,34 @@ class Call123TestSpecialTags(BaseApi): @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -223,20 +204,20 @@ def call_123_test_special_tags( @typing.overload def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def call_123_test_special_tags( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -259,34 +240,34 @@ class ApiForpatch(BaseApi): @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,20 +278,20 @@ def patch( @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200.py new file mode 100644 index 00000000000..d54e97d5447 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = Client + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 54% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.py index 1bb21445f6f..a6040f55770 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.py @@ -25,124 +25,135 @@ 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, -) +from .. import path +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + RequiredStringGroupSchema = schemas.IntSchema + RequiredInt64GroupSchema = schemas.Int64Schema + StringGroupSchema = schemas.IntSchema + Int64GroupSchema = schemas.Int64Schema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'required_string_group': typing.Union[Schemas.RequiredStringGroupSchema, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[Schemas.RequiredInt64GroupSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'string_group': typing.Union[Schemas.StringGroupSchema, decimal.Decimal, int, ], + 'int64_group': typing.Union[Schemas.Int64GroupSchema, decimal.Decimal, int, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="required_string_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.RequiredStringGroupSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="required_int64_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.RequiredInt64GroupSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="string_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.StringGroupSchema, + explode=True, + ), + api_client.QueryParameter( + name="int64_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.Int64GroupSchema, + explode=True, + ), + ] + +class RequestHeaderParameters: + class Schemas: + RequiredBooleanGroupSchema = schemas.BoolSchema + BooleanGroupSchema = schemas.BoolSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'required_boolean_group': typing.Union[Schemas.RequiredBooleanGroupSchema, bool, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'boolean_group': typing.Union[Schemas.BooleanGroupSchema, bool, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="required_boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.RequiredBooleanGroupSchema, + required=True, + ), + api_client.HeaderParameter( + name="boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.BooleanGroupSchema, + ), + ] +_auth = [ + 'bearer_test', +] + +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _group_parameters_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _group_parameters_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -150,20 +161,20 @@ def _group_parameters_oapg( @typing.overload def _group_parameters_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _group_parameters_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -174,17 +185,12 @@ def _group_parameters_oapg( 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(RequestQueryParameters.Params, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, 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, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -195,10 +201,7 @@ class instances used_path += serialized_value _headers = HTTPHeaderDict() - for parameter in ( - request_header_required_boolean_group, - request_header_boolean_group, - ): + for parameter in RequestHeaderParameters.parameters: parameter_data = header_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -236,21 +239,21 @@ class GroupParameters(BaseApi): @typing.overload def group_parameters( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def group_parameters( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -258,20 +261,20 @@ def group_parameters( @typing.overload def group_parameters( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def group_parameters( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -291,21 +294,21 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def delete( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -313,20 +316,20 @@ def delete( @typing.overload def delete( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 54% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.pyi index 9803516eec2..af1224dba8a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.pyi @@ -25,132 +25,126 @@ 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, -} - +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + RequiredStringGroupSchema = schemas.IntSchema + RequiredInt64GroupSchema = schemas.Int64Schema + StringGroupSchema = schemas.IntSchema + Int64GroupSchema = schemas.Int64Schema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'required_string_group': typing.Union[Schemas.RequiredStringGroupSchema, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[Schemas.RequiredInt64GroupSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'string_group': typing.Union[Schemas.StringGroupSchema, decimal.Decimal, int, ], + 'int64_group': typing.Union[Schemas.Int64GroupSchema, decimal.Decimal, int, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="required_string_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.RequiredStringGroupSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="required_int64_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.RequiredInt64GroupSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="string_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.StringGroupSchema, + explode=True, + ), + api_client.QueryParameter( + name="int64_group", + style=api_client.ParameterStyle.FORM, + schema=Schemas.Int64GroupSchema, + explode=True, + ), + ] + +class RequestHeaderParameters: + class Schemas: + RequiredBooleanGroupSchema = schemas.BoolSchema + BooleanGroupSchema = schemas.BoolSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'required_boolean_group': typing.Union[Schemas.RequiredBooleanGroupSchema, bool, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'boolean_group': typing.Union[Schemas.BooleanGroupSchema, bool, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="required_boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.RequiredBooleanGroupSchema, + required=True, + ), + api_client.HeaderParameter( + name="boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.BooleanGroupSchema, + ), + ] class BaseApi(api_client.Api): @typing.overload def _group_parameters_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _group_parameters_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -158,20 +152,20 @@ def _group_parameters_oapg( @typing.overload def _group_parameters_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _group_parameters_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -182,17 +176,12 @@ def _group_parameters_oapg( 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(RequestQueryParameters.Params, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, 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, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -203,10 +192,7 @@ class instances used_path += serialized_value _headers = HTTPHeaderDict() - for parameter in ( - request_header_required_boolean_group, - request_header_boolean_group, - ): + for parameter in RequestHeaderParameters.parameters: parameter_data = header_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -244,21 +230,21 @@ class GroupParameters(BaseApi): @typing.overload def group_parameters( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def group_parameters( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -266,20 +252,20 @@ def group_parameters( @typing.overload def group_parameters( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def group_parameters( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -299,21 +285,21 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def delete( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -321,20 +307,20 @@ def delete( @typing.overload def delete( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete( self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 f56f26eac5f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py +++ /dev/null @@ -1,752 +0,0 @@ -# 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, -) - - -@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 _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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _enum_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enum_parameters_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 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 - - _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(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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def enum_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enum_parameters( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_params, - 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, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_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/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi deleted file mode 100644 index a2468eb18d8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ /dev/null @@ -1,685 +0,0 @@ -# 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, -) - - -@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 _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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _enum_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enum_parameters_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 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 - - _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(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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def enum_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enum_parameters( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_params, - 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, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_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/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py new file mode 100644 index 00000000000..e66b7bc5728 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py @@ -0,0 +1,738 @@ +# 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 +from . import response_for_200 +from . import response_for_404 + + + +class RequestQueryParameters: + class Schemas: + + + 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) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'enum_query_string_array': typing.Union[Schemas.EnumQueryStringArraySchema, list, tuple, ], + 'enum_query_string': typing.Union[Schemas.EnumQueryStringSchema, str, ], + 'enum_query_integer': typing.Union[Schemas.EnumQueryIntegerSchema, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[Schemas.EnumQueryDoubleSchema, decimal.Decimal, int, float, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="enum_query_string_array", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryStringArraySchema, + explode=True, + ), + api_client.QueryParameter( + name="enum_query_string", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryStringSchema, + explode=True, + ), + api_client.QueryParameter( + name="enum_query_integer", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryIntegerSchema, + explode=True, + ), + api_client.QueryParameter( + name="enum_query_double", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryDoubleSchema, + explode=True, + ), + ] + +class RequestHeaderParameters: + class Schemas: + + + 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)") + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'enum_header_string_array': typing.Union[Schemas.EnumHeaderStringArraySchema, list, tuple, ], + 'enum_header_string': typing.Union[Schemas.EnumHeaderStringSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="enum_header_string_array", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.EnumHeaderStringArraySchema, + ), + api_client.HeaderParameter( + name="enum_header_string", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.EnumHeaderStringSchema, + ), + ] + +class RequestBody: + class Schemas: + + + class application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + return super().__new__( + cls, + *args, + enum_form_string_array=enum_form_string_array, + enum_form_string=enum_form_string, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) + +_status_code_to_response = { + '200': response_for_200.response, + '404': response_for_404.response, +} + + +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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _enum_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _enum_parameters_oapg( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + 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(RequestQueryParameters.Params, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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 RequestHeaderParameters.parameters: + 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 + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = RequestBody.parameter.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(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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def enum_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def enum_parameters( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + 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, + 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + 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, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi new file mode 100644 index 00000000000..0b777bbf738 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi @@ -0,0 +1,671 @@ +# 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 response_for_200 +from . import response_for_404 + + + +class RequestQueryParameters: + class Schemas: + + + 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) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'enum_query_string_array': typing.Union[Schemas.EnumQueryStringArraySchema, list, tuple, ], + 'enum_query_string': typing.Union[Schemas.EnumQueryStringSchema, str, ], + 'enum_query_integer': typing.Union[Schemas.EnumQueryIntegerSchema, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[Schemas.EnumQueryDoubleSchema, decimal.Decimal, int, float, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="enum_query_string_array", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryStringArraySchema, + explode=True, + ), + api_client.QueryParameter( + name="enum_query_string", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryStringSchema, + explode=True, + ), + api_client.QueryParameter( + name="enum_query_integer", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryIntegerSchema, + explode=True, + ), + api_client.QueryParameter( + name="enum_query_double", + style=api_client.ParameterStyle.FORM, + schema=Schemas.EnumQueryDoubleSchema, + explode=True, + ), + ] + +class RequestHeaderParameters: + class Schemas: + + + 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)") + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'enum_header_string_array': typing.Union[Schemas.EnumHeaderStringArraySchema, list, tuple, ], + 'enum_header_string': typing.Union[Schemas.EnumHeaderStringSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="enum_header_string_array", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.EnumHeaderStringArraySchema, + ), + api_client.HeaderParameter( + name="enum_header_string", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.EnumHeaderStringSchema, + ), + ] + +class RequestBody: + class Schemas: + + + class application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + return super().__new__( + cls, + *args, + enum_form_string_array=enum_form_string_array, + enum_form_string=enum_form_string, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) + + +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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _enum_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _enum_parameters_oapg( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + 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(RequestQueryParameters.Params, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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 RequestHeaderParameters.parameters: + 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 + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = RequestBody.parameter.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(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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def enum_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def enum_parameters( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + 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, + 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + 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, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py index 1cd6c453775..1d1e09ef194 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py @@ -27,36 +27,27 @@ from petstore_api.model.client import Client -# body param -SchemaForRequestBodyApplicationJson = Client +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = Client + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,34 +57,34 @@ class BaseApi(api_client.Api): @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -104,20 +95,20 @@ def _client_model_oapg( @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -143,7 +134,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -180,34 +171,34 @@ class ClientModel(BaseApi): @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -218,20 +209,20 @@ def client_model( @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -254,34 +245,34 @@ class ApiForpatch(BaseApi): @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -292,20 +283,20 @@ def patch( @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, 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/__init__.pyi similarity index 81% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi index 5a5927a2b09..283730f5c31 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi @@ -27,41 +27,22 @@ from petstore_api.model.client import Client -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = Client - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,34 +52,34 @@ class BaseApi(api_client.Api): @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -109,20 +90,20 @@ def _client_model_oapg( @typing.overload def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _client_model_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -148,7 +129,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -185,34 +166,34 @@ class ClientModel(BaseApi): @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -223,20 +204,20 @@ def client_model( @typing.overload def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def client_model( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -259,34 +240,34 @@ class ApiForpatch(BaseApi): @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,20 +278,20 @@ def patch( @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200.py new file mode 100644 index 00000000000..d54e97d5447 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = Client + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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 5bded5d3e06..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py +++ /dev/null @@ -1,579 +0,0 @@ -# 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(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 a7dc2f6decd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ /dev/null @@ -1,530 +0,0 @@ -# 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(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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/__init__.py new file mode 100644 index 00000000000..e0009ba7a67 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/__init__.py @@ -0,0 +1,562 @@ +# 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 +from . import response_for_200 +from . import response_for_404 + + + +class RequestBody: + class Schemas: + + + class application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + 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, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) + +_auth = [ + 'http_basic_test', +] + +_status_code_to_response = { + '200': response_for_200.response, + '404': response_for_404.response, +} + + +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[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _endpoint_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _endpoint_parameters_oapg( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def endpoint_parameters( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def endpoint_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def endpoint_parameters( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/__init__.pyi new file mode 100644 index 00000000000..be606039c19 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/__init__.pyi @@ -0,0 +1,512 @@ +# 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 response_for_200 +from . import response_for_404 + + + +class RequestBody: + class Schemas: + + + class application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + 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, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) + + +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[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _endpoint_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _endpoint_parameters_oapg( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def endpoint_parameters( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def endpoint_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def endpoint_parameters( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py index 13981bf4750..936e93b4ebc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -# body param -SchemaForRequestBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = AdditionalPropertiesWithArrayOfEnums + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _additional_properties_with_array_of_enums_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _additional_properties_with_array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _additional_properties_with_array_of_enums_oapg( def _additional_properties_with_array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -140,7 +131,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_additional_properties_with_array_of_enums.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -178,26 +169,26 @@ class AdditionalPropertiesWithArrayOfEnums(BaseApi): def additional_properties_with_array_of_enums( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def additional_properties_with_array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -206,7 +197,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -216,20 +207,20 @@ def additional_properties_with_array_of_enums( def additional_properties_with_array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def additional_properties_with_array_of_enums( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -252,26 +243,26 @@ class ApiForget(BaseApi): def get( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -280,7 +271,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -290,20 +281,20 @@ def get( def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi index c76f1c57987..99b50077623 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = AdditionalPropertiesWithArrayOfEnums - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _additional_properties_with_array_of_enums_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _additional_properties_with_array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _additional_properties_with_array_of_enums_oapg( def _additional_properties_with_array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -145,7 +126,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_additional_properties_with_array_of_enums.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -183,26 +164,26 @@ class AdditionalPropertiesWithArrayOfEnums(BaseApi): def additional_properties_with_array_of_enums( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def additional_properties_with_array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -211,7 +192,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -221,20 +202,20 @@ def additional_properties_with_array_of_enums( def additional_properties_with_array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def additional_properties_with_array_of_enums( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -257,26 +238,26 @@ class ApiForget(BaseApi): def get( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -285,7 +266,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -295,20 +276,20 @@ def get( def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200.py new file mode 100644 index 00000000000..e7869c57801 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = AdditionalPropertiesWithArrayOfEnums + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py index 7785729eb28..6c57333639e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py @@ -27,61 +27,59 @@ from petstore_api.model.file_schema_test_class import FileSchemaTestClass -# body param -SchemaForRequestBodyApplicationJson = FileSchemaTestClass +from .. import path +from . import response_for_200 -request_body_file_schema_test_class = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = FileSchemaTestClass -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +89,19 @@ def _body_with_file_schema_oapg( @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +122,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -161,32 +159,32 @@ class BodyWithFileSchema(BaseApi): @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -196,19 +194,19 @@ def body_with_file_schema( @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,32 +227,32 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -264,19 +262,19 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 79% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi index 481882c97fa..a85d7066ed2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi @@ -27,66 +27,54 @@ from petstore_api.model.file_schema_test_class import FileSchemaTestClass -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJson = FileSchemaTestClass -request_body_file_schema_test_class = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = FileSchemaTestClass - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +84,19 @@ def _body_with_file_schema_oapg( @typing.overload def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _body_with_file_schema_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +117,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +154,32 @@ class BodyWithFileSchema(BaseApi): @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +189,19 @@ def body_with_file_schema( @typing.overload def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def body_with_file_schema( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +222,32 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +257,19 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.py index 6e34838b848..00efb75aebf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.py @@ -27,93 +27,97 @@ 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, -) +from .. import path +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + QuerySchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'query': typing.Union[Schemas.QuerySchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="query", + style=api_client.ParameterStyle.FORM, + schema=Schemas.QuerySchema, + required=True, + explode=True, + ), + ] + +class RequestBody: + class Schemas: + application_json = User + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -121,22 +125,22 @@ def _body_with_query_params_oapg( @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -146,13 +150,11 @@ def _body_with_query_params_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_query, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,7 +172,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -207,37 +209,37 @@ class BodyWithQueryParams(BaseApi): @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -245,22 +247,22 @@ def body_with_query_params( @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -281,37 +283,37 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -319,22 +321,22 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.pyi index 03d8d0b48f6..1b9010064c2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.pyi @@ -27,98 +27,92 @@ 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, -} +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + QuerySchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'query': typing.Union[Schemas.QuerySchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="query", + style=api_client.ParameterStyle.FORM, + schema=Schemas.QuerySchema, + required=True, + explode=True, + ), + ] + +class RequestBody: + class Schemas: + application_json = User + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -126,22 +120,22 @@ def _body_with_query_params_oapg( @typing.overload def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _body_with_query_params_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -151,13 +145,11 @@ def _body_with_query_params_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_query, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -175,7 +167,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -212,37 +204,37 @@ class BodyWithQueryParams(BaseApi): @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -250,22 +242,22 @@ def body_with_query_params( @typing.overload def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def body_with_query_params( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -286,37 +278,37 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -324,22 +316,22 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.py index c5cab839898..7e24ed1ef75 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.py @@ -24,82 +24,83 @@ 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, -) +from .. import path +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + SomeVarSchema = schemas.StrSchema + SomeVarSchema = schemas.StrSchema + SomeVarSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'someVar': typing.Union[Schemas.SomeVarSchema, str, ], + 'SomeVar': typing.Union[Schemas.SomeVarSchema, str, ], + 'some_var': typing.Union[Schemas.SomeVarSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="someVar", + style=api_client.ParameterStyle.FORM, + schema=Schemas.SomeVarSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="SomeVar", + style=api_client.ParameterStyle.FORM, + schema=Schemas.SomeVarSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="some_var", + style=api_client.ParameterStyle.FORM, + schema=Schemas.SomeVarSchema, + required=True, + explode=True, + ), + ] +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _case_sensitive_params_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _case_sensitive_params_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -107,18 +108,18 @@ def _case_sensitive_params_oapg( @typing.overload def _case_sensitive_params_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _case_sensitive_params_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -128,15 +129,11 @@ def _case_sensitive_params_oapg( 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(RequestQueryParameters.Params, 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, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -175,19 +172,19 @@ class CaseSensitiveParams(BaseApi): @typing.overload def case_sensitive_params( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def case_sensitive_params( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -195,18 +192,18 @@ def case_sensitive_params( @typing.overload def case_sensitive_params( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def case_sensitive_params( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -225,19 +222,19 @@ class ApiForput(BaseApi): @typing.overload def put( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -245,18 +242,18 @@ def put( @typing.overload def put( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def put( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.pyi index 766073175bf..4964daaa94a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.pyi @@ -24,87 +24,78 @@ 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, -} - +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + SomeVarSchema = schemas.StrSchema + SomeVarSchema = schemas.StrSchema + SomeVarSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'someVar': typing.Union[Schemas.SomeVarSchema, str, ], + 'SomeVar': typing.Union[Schemas.SomeVarSchema, str, ], + 'some_var': typing.Union[Schemas.SomeVarSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="someVar", + style=api_client.ParameterStyle.FORM, + schema=Schemas.SomeVarSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="SomeVar", + style=api_client.ParameterStyle.FORM, + schema=Schemas.SomeVarSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="some_var", + style=api_client.ParameterStyle.FORM, + schema=Schemas.SomeVarSchema, + required=True, + explode=True, + ), + ] class BaseApi(api_client.Api): @typing.overload def _case_sensitive_params_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _case_sensitive_params_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -112,18 +103,18 @@ def _case_sensitive_params_oapg( @typing.overload def _case_sensitive_params_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _case_sensitive_params_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -133,15 +124,11 @@ def _case_sensitive_params_oapg( 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(RequestQueryParameters.Params, 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, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -180,19 +167,19 @@ class CaseSensitiveParams(BaseApi): @typing.overload def case_sensitive_params( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def case_sensitive_params( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -200,18 +187,18 @@ def case_sensitive_params( @typing.overload def case_sensitive_params( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def case_sensitive_params( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -230,19 +217,19 @@ class ApiForput(BaseApi): @typing.overload def put( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def put( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -250,18 +237,18 @@ def put( @typing.overload def put( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def put( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py index 055301928b9..06f74fc57fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py @@ -27,36 +27,31 @@ from petstore_api.model.client import Client -# body param -SchemaForRequestBodyApplicationJson = Client +from .. import path +from . import response_for_200 -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Client +class RequestBody: + class Schemas: + application_json = Client -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) +_auth = [ + 'api_key_query', +] -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,34 +61,34 @@ class BaseApi(api_client.Api): @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -104,20 +99,20 @@ def _classname_oapg( @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -143,7 +138,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -181,34 +176,34 @@ class Classname(BaseApi): @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -219,20 +214,20 @@ def classname( @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -255,34 +250,34 @@ class ApiForpatch(BaseApi): @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -293,20 +288,20 @@ def patch( @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi index 72a085dbaf5..80ea9ec0a3a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi @@ -27,44 +27,22 @@ from petstore_api.model.client import Client -from . import path +from . import response_for_200 -# 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, -} +class RequestBody: + class Schemas: + application_json = Client + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) _all_accept_content_types = ( 'application/json', ) @@ -74,34 +52,34 @@ class BaseApi(api_client.Api): @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -112,20 +90,20 @@ def _classname_oapg( @typing.overload def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _classname_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -151,7 +129,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -189,34 +167,34 @@ class Classname(BaseApi): @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -227,20 +205,20 @@ def classname( @typing.overload def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def classname( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -263,34 +241,34 @@ class ApiForpatch(BaseApi): @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -301,20 +279,20 @@ def patch( @typing.overload def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200.py new file mode 100644 index 00000000000..d54e97d5447 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = Client + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py index 4d74087f3bd..d3468a8b26f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py @@ -24,61 +24,46 @@ from petstore_api import schemas # noqa: F401 -from . import path +from .. import path +from . import response_for_200 +from . import response_for_default -# 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 +class RequestPathParameters: + class Schemas: + IdSchema = schemas.StrSchema -request_path_id = api_client.PathParameter( - name="id", - style=api_client.ParameterStyle.SIMPLE, - schema=IdSchema, - required=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'id': typing.Union[Schemas.IdSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@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, -) + parameters = [ + api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.IdSchema, + required=True, + ), + ] _status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, + '200': response_for_200.response, + 'default': response_for_default.response, } @@ -86,20 +71,20 @@ class BaseApi(api_client.Api): @typing.overload def _delete_coffee_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, ]: ... @typing.overload def _delete_coffee_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -107,19 +92,19 @@ def _delete_coffee_oapg( @typing.overload def _delete_coffee_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _delete_coffee_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -130,13 +115,11 @@ def _delete_coffee_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -179,20 +162,20 @@ class DeleteCoffee(BaseApi): @typing.overload def delete_coffee( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, ]: ... @typing.overload def delete_coffee( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -200,19 +183,19 @@ def delete_coffee( @typing.overload def delete_coffee( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete_coffee( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -231,20 +214,20 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, ]: ... @typing.overload def delete( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -252,19 +235,19 @@ def delete( @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.pyi index a63211d2c05..b015e26decd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.pyi @@ -24,76 +24,61 @@ 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 -) +from . import response_for_200 +from . import response_for_default -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass +class RequestPathParameters: + class Schemas: + IdSchema = schemas.StrSchema -request_path_id = api_client.PathParameter( - name="id", - style=api_client.ParameterStyle.SIMPLE, - schema=IdSchema, - required=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'id': typing.Union[Schemas.IdSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@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, -) + parameters = [ + api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.IdSchema, + required=True, + ), + ] class BaseApi(api_client.Api): @typing.overload def _delete_coffee_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, ]: ... @typing.overload def _delete_coffee_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -101,19 +86,19 @@ class BaseApi(api_client.Api): @typing.overload def _delete_coffee_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _delete_coffee_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -124,13 +109,11 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -173,20 +156,20 @@ class DeleteCoffee(BaseApi): @typing.overload def delete_coffee( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, ]: ... @typing.overload def delete_coffee( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -194,19 +177,19 @@ class DeleteCoffee(BaseApi): @typing.overload def delete_coffee( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete_coffee( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -225,20 +208,20 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, ]: ... @typing.overload def delete( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -246,19 +229,19 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, + response_for_200.ApiResponse, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 90% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/__init__.py index 5782ac9c7e7..c4593658606 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/__init__.py @@ -25,27 +25,13 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.health_check_result import HealthCheckResult +from .. import path +from . import response_for_200 -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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -60,7 +46,7 @@ def _fake_health_get_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -80,7 +66,7 @@ def _fake_health_get_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -139,7 +125,7 @@ def fake_health_get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -159,7 +145,7 @@ def fake_health_get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -189,7 +175,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -209,7 +195,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 89% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/__init__.pyi index 448891337f1..db7166d2f63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/__init__.pyi @@ -25,32 +25,8 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.health_check_result import HealthCheckResult +from . import response_for_200 -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', ) @@ -65,7 +41,7 @@ def _fake_health_get_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -85,7 +61,7 @@ def _fake_health_get_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -144,7 +120,7 @@ def fake_health_get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -164,7 +140,7 @@ def fake_health_get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -194,7 +170,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -214,7 +190,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200.py new file mode 100644 index 00000000000..bb59ed13e40 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = HealthCheckResult + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 70% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py index 71113ab91af..ec6f97d0ed2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py @@ -25,89 +25,87 @@ 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, -) +from .. import path +from . import response_for_200 + + + +class RequestBody: + class Schemas: + + + class application_json( + 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, ], + ) -> 'application_json': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -117,19 +115,19 @@ def _inline_additional_properties_oapg( @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -151,7 +149,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -188,32 +186,32 @@ class InlineAdditionalProperties(BaseApi): @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -223,19 +221,19 @@ def inline_additional_properties( @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -256,32 +254,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -291,19 +289,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 70% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi index 2363305f7cb..33b09504fb4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi @@ -25,94 +25,82 @@ 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, -} +from . import response_for_200 + + + +class RequestBody: + class Schemas: + + + class application_json( + 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, ], + ) -> 'application_json': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -122,19 +110,19 @@ def _inline_additional_properties_oapg( @typing.overload def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _inline_additional_properties_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -156,7 +144,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -193,32 +181,32 @@ class InlineAdditionalProperties(BaseApi): @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -228,19 +216,19 @@ def inline_additional_properties( @typing.overload def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def inline_additional_properties( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -261,32 +249,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -296,19 +284,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + body: typing.Union[RequestBody.Schemas.application_json,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 d7904db7a88..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py +++ /dev/null @@ -1,851 +0,0 @@ -# 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(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 56503791e7b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ /dev/null @@ -1,828 +0,0 @@ -# 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(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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py new file mode 100644 index 00000000000..f463f0d02b7 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py @@ -0,0 +1,700 @@ +# 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 +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + + + 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, + ) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'compositionAtRoot': typing.Union[Schemas.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[Schemas.CompositionInPropertySchema, dict, frozendict.frozendict, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="compositionAtRoot", + style=api_client.ParameterStyle.FORM, + schema=Schemas.CompositionAtRootSchema, + explode=True, + ), + api_client.QueryParameter( + name="compositionInProperty", + style=api_client.ParameterStyle.FORM, + schema=Schemas.CompositionInPropertySchema, + explode=True, + ), + ] + +class RequestBody: + class Schemas: + + + class application_json( + 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], + ) -> 'application_json': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + someProp=someProp, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} +_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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _inline_composition_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = 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[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _inline_composition_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def inline_composition( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = 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[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def inline_composition( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = 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[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi new file mode 100644 index 00000000000..f227aabf776 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi @@ -0,0 +1,683 @@ +# 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 response_for_200 + + + +class RequestQueryParameters: + class Schemas: + + + 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, + ) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'compositionAtRoot': typing.Union[Schemas.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[Schemas.CompositionInPropertySchema, dict, frozendict.frozendict, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="compositionAtRoot", + style=api_client.ParameterStyle.FORM, + schema=Schemas.CompositionAtRootSchema, + explode=True, + ), + api_client.QueryParameter( + name="compositionInProperty", + style=api_client.ParameterStyle.FORM, + schema=Schemas.CompositionInPropertySchema, + explode=True, + ), + ] + +class RequestBody: + class Schemas: + + + class application_json( + 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], + ) -> 'application_json': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + someProp=someProp, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) +_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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _inline_composition_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = 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[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _inline_composition_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def inline_composition( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = 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[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def inline_composition( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = 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[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200.py new file mode 100644 index 00000000000..73ccd674578 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200.py @@ -0,0 +1,183 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + + + class application_json( + 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], + ) -> 'application_json': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + someProp=someProp, + _configuration=_configuration, + **kwargs, + ) + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + BodySchemas.multipart_form_data, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + 'multipart/form-data': api_client.MediaType( + schema=BodySchemas.multipart_form_data, + ), + }, +) 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/__init__.py similarity index 56% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py index e1ce6578278..ca1b716630b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py @@ -25,94 +25,92 @@ from petstore_api import schemas # noqa: F401 -# body param +from .. import path +from . import response_for_200 -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - class MetaOapg: - required = { - "param", - "param2", - } +class RequestBody: + class Schemas: - 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 application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + return super().__new__( + cls, + *args, + param=param, + param2=param2, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @@ -120,24 +118,24 @@ class BaseApi(api_client.Api): 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _json_form_data_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @@ -146,7 +144,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -155,19 +153,19 @@ def _json_form_data_oapg( def _json_form_data_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -186,7 +184,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -224,24 +222,24 @@ class JsonFormData(BaseApi): 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def json_form_data( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @@ -250,7 +248,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -259,19 +257,19 @@ def json_form_data( def json_form_data( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -292,24 +290,24 @@ class ApiForget(BaseApi): def get( self, content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @@ -318,7 +316,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -327,19 +325,19 @@ def get( def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 57% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi index 262f5e3a77a..0e2ecdb4462 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi @@ -25,99 +25,87 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -# body param -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "param", - "param2", - } +class RequestBody: + class Schemas: - 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 application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + return super().__new__( + cls, + *args, + param=param, + param2=param2, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) class BaseApi(api_client.Api): @@ -125,24 +113,24 @@ class BaseApi(api_client.Api): 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _json_form_data_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @@ -151,7 +139,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -160,19 +148,19 @@ def _json_form_data_oapg( def _json_form_data_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -191,7 +179,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -229,24 +217,24 @@ class JsonFormData(BaseApi): 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def json_form_data( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @@ -255,7 +243,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -264,19 +252,19 @@ def json_form_data( def json_form_data( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -297,24 +285,24 @@ class ApiForget(BaseApi): def get( self, content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, ]: ... @@ -323,7 +311,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -332,19 +320,19 @@ def get( def get( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 75% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py index 3322e593ccd..b653e5f7946 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py @@ -27,28 +27,26 @@ from petstore_api.model.json_patch_request import JSONPatchRequest -# body param -SchemaForRequestBodyApplicationJsonPatchjson = JSONPatchRequest +from .. import path +from . import response_for_200 -request_body_json_patch_request = api_client.RequestBody( - content={ - 'application/json-patch+json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJsonPatchjson), - }, -) +class RequestBody: + class Schemas: + application_json_patchjson = JSONPatchRequest -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json-patch+json': api_client.MediaType( + schema=Schemas.application_json_patchjson + ), + }, + ) - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @@ -56,24 +54,24 @@ class BaseApi(api_client.Api): def _json_patch_oapg( self, content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _json_patch_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @@ -82,7 +80,7 @@ def _json_patch_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -91,19 +89,19 @@ def _json_patch_oapg( def _json_patch_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _json_patch_oapg( self, content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -122,7 +120,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_json_patch_request.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -160,24 +158,24 @@ class JsonPatch(BaseApi): def json_patch( self, content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def json_patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @@ -186,7 +184,7 @@ def json_patch( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -195,19 +193,19 @@ def json_patch( def json_patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def json_patch( self, content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -228,24 +226,24 @@ class ApiForpatch(BaseApi): def patch( self, content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @@ -254,7 +252,7 @@ def patch( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -263,19 +261,19 @@ def patch( def patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi index d55867cd112..2c41d512575 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi @@ -27,33 +27,21 @@ from petstore_api.model.json_patch_request import JSONPatchRequest -from . import path +from . import response_for_200 -# body param -SchemaForRequestBodyApplicationJsonPatchjson = JSONPatchRequest -request_body_json_patch_request = api_client.RequestBody( - content={ - 'application/json-patch+json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJsonPatchjson), - }, -) +class RequestBody: + class Schemas: + application_json_patchjson = JSONPatchRequest - -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json-patch+json': api_client.MediaType( + schema=Schemas.application_json_patchjson + ), + }, + ) class BaseApi(api_client.Api): @@ -61,24 +49,24 @@ class BaseApi(api_client.Api): def _json_patch_oapg( self, content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _json_patch_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @@ -87,7 +75,7 @@ def _json_patch_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -96,19 +84,19 @@ def _json_patch_oapg( def _json_patch_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _json_patch_oapg( self, content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -127,7 +115,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_json_patch_request.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -165,24 +153,24 @@ class JsonPatch(BaseApi): def json_patch( self, content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def json_patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @@ -191,7 +179,7 @@ def json_patch( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -200,19 +188,19 @@ def json_patch( def json_patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def json_patch( self, content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -233,24 +221,24 @@ class ApiForpatch(BaseApi): def patch( self, content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, 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, + response_for_200.ApiResponse, ]: ... @@ -259,7 +247,7 @@ def patch( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -268,19 +256,19 @@ def patch( def patch( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def patch( self, content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json_patchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 64% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py index 5246ee555a8..26d8b9a3062 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py @@ -25,35 +25,26 @@ from petstore_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json_charsetutf_8 = schemas.AnyTypeSchema + parameter = api_client.RequestBody( + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=Schemas.application_json_charsetutf_8 + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json; charset=utf-8', ) @@ -64,26 +55,26 @@ class BaseApi(api_client.Api): 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @@ -92,7 +83,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -102,20 +93,20 @@ def _json_with_charset_oapg( 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -138,7 +129,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -176,26 +167,26 @@ class JsonWithCharset(BaseApi): 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @@ -204,7 +195,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -214,20 +205,20 @@ def json_with_charset( 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -250,26 +241,26 @@ class ApiForpost(BaseApi): 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @@ -278,7 +269,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -288,20 +279,20 @@ def post( 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, 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/__init__.pyi similarity index 63% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi index 7e075373a3e..0721d26e50d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi @@ -25,40 +25,21 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json_charsetutf_8 = schemas.AnyTypeSchema - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=Schemas.application_json_charsetutf_8 + ), + }, + ) _all_accept_content_types = ( 'application/json; charset=utf-8', ) @@ -69,26 +50,26 @@ class BaseApi(api_client.Api): 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @@ -97,7 +78,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -107,20 +88,20 @@ def _json_with_charset_oapg( 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -143,7 +124,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -181,26 +162,26 @@ class JsonWithCharset(BaseApi): 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @@ -209,7 +190,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -219,20 +200,20 @@ def json_with_charset( 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -255,26 +236,26 @@ class ApiForpost(BaseApi): 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, ]: ... @@ -283,7 +264,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, @@ -293,20 +274,20 @@ def post( 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.application_json_charsetutf_8, 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, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200.py new file mode 100644 index 00000000000..7c80211b70e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200.py @@ -0,0 +1,41 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + application_json_charsetutf_8 = schemas.AnyTypeSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json_charsetutf_8, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=BodySchemas.application_json_charsetutf_8, + ), + }, +) 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/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py similarity index 60% rename from 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 rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py index dba719e1352..c8b5db736da 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py @@ -9,9 +9,8 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict -from unit_test_api import api_client, exceptions +from petstore_api import api_client, exceptions from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -23,19 +22,18 @@ import frozendict # noqa: F401 -from unit_test_api import schemas # noqa: F401 +from petstore_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - class MetaOapg: +class RequestQueryParameters: + class Schemas: - class not_schema( + class MapBeanSchema( schemas.DictSchema ): @@ -43,140 +41,143 @@ class not_schema( class MetaOapg: class properties: - foo = schemas.StrSchema + keyword = schemas.StrSchema __annotations__ = { - "foo": foo, + "keyword": keyword, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... + 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["foo", ], str]): + 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["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... + 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["foo", ], str]): + 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, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, + 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], - ) -> 'not_schema': + ) -> 'MapBeanSchema': return super().__new__( cls, *args, - foo=foo, + keyword=keyword, _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, - ) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'mapBean': typing.Union[Schemas.MapBeanSchema, dict, frozendict.frozendict, ], + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) + parameters = [ + api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=Schemas.MapBeanSchema, + explode=True, + ), + ] +_status_code_to_response = { + '200': response_for_200.response, +} class BaseApi(api_client.Api): @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( + def _object_in_query_oapg( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( + def _object_in_query_oapg( self, skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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( + def _object_in_query_oapg( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... - def _post_not_more_complex_schema_response_body_for_content_types_oapg( + def _object_in_query_oapg( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = 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(RequestQueryParameters.Params, query_params) used_path = path.value - _headers = HTTPHeaderDict() + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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 - 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, + method='get'.upper(), stream=stream, timeout=timeout, ) @@ -196,100 +197,100 @@ class instances return api_response -class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): +class ObjectInQuery(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( + def object_in_query( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload - def post_not_more_complex_schema_response_body_for_content_types( + def object_in_query( self, skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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( + def object_in_query( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... - def post_not_more_complex_schema_response_body_for_content_types( + def object_in_query( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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, + return self._object_in_query_oapg( + query_params=query_params, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization ) -class ApiForpost(BaseApi): +class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload - def post( + def get( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload - def post( + def get( self, skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def post( + def get( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... - def post( + def get( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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, + return self._object_in_query_oapg( + query_params=query_params, 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.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi similarity index 60% rename from 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 rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi index 9cf3c05972a..d5256ae2579 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi @@ -9,9 +9,8 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict -from unit_test_api import api_client, exceptions +from petstore_api import api_client, exceptions from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -23,21 +22,17 @@ import frozendict # noqa: F401 -from unit_test_api import schemas # noqa: F401 +from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: +class RequestQueryParameters: + class Schemas: - class not_schema( + class MapBeanSchema( schemas.DictSchema ): @@ -45,143 +40,139 @@ class not_schema( class MetaOapg: class properties: - foo = schemas.StrSchema + keyword = schemas.StrSchema __annotations__ = { - "foo": foo, + "keyword": keyword, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... + 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["foo", ], str]): + 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["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... + 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["foo", ], str]): + 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, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, + 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], - ) -> 'not_schema': + ) -> 'MapBeanSchema': return super().__new__( cls, *args, - foo=foo, + keyword=keyword, _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, - ) - + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'mapBean': typing.Union[Schemas.MapBeanSchema, dict, frozendict.frozendict, ], + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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', -) + parameters = [ + api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=Schemas.MapBeanSchema, + explode=True, + ), + ] class BaseApi(api_client.Api): @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( + def _object_in_query_oapg( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( + def _object_in_query_oapg( self, skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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( + def _object_in_query_oapg( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... - def _post_not_more_complex_schema_response_body_for_content_types_oapg( + def _object_in_query_oapg( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = 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(RequestQueryParameters.Params, query_params) used_path = path.value - _headers = HTTPHeaderDict() + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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 - 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, + method='get'.upper(), stream=stream, timeout=timeout, ) @@ -201,100 +192,100 @@ class instances return api_response -class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): +class ObjectInQuery(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( + def object_in_query( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload - def post_not_more_complex_schema_response_body_for_content_types( + def object_in_query( self, skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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( + def object_in_query( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... - def post_not_more_complex_schema_response_body_for_content_types( + def object_in_query( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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, + return self._object_in_query_oapg( + query_params=query_params, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization ) -class ApiForpost(BaseApi): +class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload - def post( + def get( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload - def post( + def get( self, skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def post( + def get( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... - def post( + def get( self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), 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, + 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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 4f12ff8fadc..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,661 +0,0 @@ -# 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(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 b24853ab38c..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,656 +0,0 @@ -# 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(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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py new file mode 100644 index 00000000000..f7c9fbdab0d --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py @@ -0,0 +1,654 @@ +# 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 +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + AbSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'Ab': typing.Union[Schemas.AbSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Schemas.Model1Schema, + explode=True, + ), + api_client.QueryParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + api_client.QueryParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=Schemas.AbSchema, + explode=True, + ), + api_client.QueryParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ModelSelfSchema, + explode=True, + ), + api_client.QueryParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + ] + +class RequestHeaderParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.Model1Schema, + ), + api_client.HeaderParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + ), + api_client.HeaderParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ModelSelfSchema, + ), + api_client.HeaderParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + ), + ] + +class RequestPathParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + AbSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'Ab': typing.Union[Schemas.AbSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.Model1Schema, + required=True, + ), + api_client.PathParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + required=True, + ), + api_client.PathParameter( + name="Ab", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.AbSchema, + required=True, + ), + api_client.PathParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ModelSelfSchema, + required=True, + ), + api_client.PathParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + required=True, + ), + ] + +class RequestCookieParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + AbSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'Ab': typing.Union[Schemas.AbSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.CookieParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Schemas.Model1Schema, + explode=True, + ), + api_client.CookieParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + api_client.CookieParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=Schemas.AbSchema, + explode=True, + ), + api_client.CookieParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ModelSelfSchema, + explode=True, + ), + api_client.CookieParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + ] + +class RequestBody: + class Schemas: + application_json = schemas.AnyTypeSchema + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} +_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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _parameter_collisions_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _parameter_collisions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _parameter_collisions_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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(RequestQueryParameters.Params, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) + self._verify_typed_dict_inputs_oapg(RequestCookieParameters.Params, cookie_params) + used_path = path.value + + _path_params = {} + for parameter in RequestPathParameters.parameters: + 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 RequestQueryParameters.parameters: + 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 RequestHeaderParameters.parameters: + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def parameter_collisions( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def parameter_collisions( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def parameter_collisions( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi new file mode 100644 index 00000000000..66f11bd8f7d --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi @@ -0,0 +1,649 @@ +# 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 response_for_200 + + + +class RequestQueryParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + AbSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'Ab': typing.Union[Schemas.AbSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Schemas.Model1Schema, + explode=True, + ), + api_client.QueryParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + api_client.QueryParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=Schemas.AbSchema, + explode=True, + ), + api_client.QueryParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ModelSelfSchema, + explode=True, + ), + api_client.QueryParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + ] + +class RequestHeaderParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.Model1Schema, + ), + api_client.HeaderParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + ), + api_client.HeaderParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ModelSelfSchema, + ), + api_client.HeaderParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + ), + ] + +class RequestPathParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + AbSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'Ab': typing.Union[Schemas.AbSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.Model1Schema, + required=True, + ), + api_client.PathParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + required=True, + ), + api_client.PathParameter( + name="Ab", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.AbSchema, + required=True, + ), + api_client.PathParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ModelSelfSchema, + required=True, + ), + api_client.PathParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ABSchema, + required=True, + ), + ] + +class RequestCookieParameters: + class Schemas: + Model1Schema = schemas.StrSchema + ABSchema = schemas.StrSchema + AbSchema = schemas.StrSchema + ModelSelfSchema = schemas.StrSchema + ABSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + '1': typing.Union[Schemas.Model1Schema, str, ], + 'aB': typing.Union[Schemas.ABSchema, str, ], + 'Ab': typing.Union[Schemas.AbSchema, str, ], + 'self': typing.Union[Schemas.ModelSelfSchema, str, ], + 'A-B': typing.Union[Schemas.ABSchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.CookieParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Schemas.Model1Schema, + explode=True, + ), + api_client.CookieParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + api_client.CookieParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=Schemas.AbSchema, + explode=True, + ), + api_client.CookieParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ModelSelfSchema, + explode=True, + ), + api_client.CookieParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ABSchema, + explode=True, + ), + ] + +class RequestBody: + class Schemas: + application_json = schemas.AnyTypeSchema + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) +_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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _parameter_collisions_oapg( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def _parameter_collisions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _parameter_collisions_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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(RequestQueryParameters.Params, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) + self._verify_typed_dict_inputs_oapg(RequestCookieParameters.Params, cookie_params) + used_path = path.value + + _path_params = {} + for parameter in RequestPathParameters.parameters: + 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 RequestQueryParameters.parameters: + 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 RequestHeaderParameters.parameters: + 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 = RequestBody.parameter.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(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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def parameter_collisions( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def parameter_collisions( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def parameter_collisions( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[RequestBody.Schemas.application_json, 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: RequestQueryParameters.Params = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), + cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + 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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200.py new file mode 100644 index 00000000000..90561be6384 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200.py @@ -0,0 +1,41 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + application_json = schemas.AnyTypeSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 55% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py index 94f430e8bb7..29a7e548352 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py @@ -25,127 +25,126 @@ 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 -) +from .. import path +from . import response_for_200 -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 RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "requiredFile", + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], } - - 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, + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), ] - headers: schemas.Unset = schemas.unset - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) +class RequestBody: + class Schemas: + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + requiredFile=requiredFile, + additionalMetadata=additionalMetadata, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) + +_auth = [ + 'petstore_auth', +] + +_status_code_to_response = { + '200': response_for_200.response, +} _all_accept_content_types = ( 'application/json', ) @@ -156,28 +155,28 @@ class BaseApi(api_client.Api): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -186,8 +185,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -197,22 +196,22 @@ def _upload_file_with_required_file_oapg( 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -224,13 +223,11 @@ def _upload_file_with_required_file_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -249,7 +246,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -288,28 +285,28 @@ class UploadFileWithRequiredFile(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -318,8 +315,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -329,22 +326,22 @@ def upload_file_with_required_file( 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -368,28 +365,28 @@ class ApiForpost(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -398,8 +395,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -409,22 +406,22 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 56% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.pyi index d5fb0a61b07..4a3ab612f40 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.pyi @@ -25,135 +25,117 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.api_response import ApiResponse +from . import response_for_200 -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 RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema - class MetaOapg: - required = { - "requiredFile", + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], } - - 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, + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), ] - 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, -} +class RequestBody: + class Schemas: + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + requiredFile=requiredFile, + additionalMetadata=additionalMetadata, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -164,28 +146,28 @@ class BaseApi(api_client.Api): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -194,8 +176,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -205,22 +187,22 @@ def _upload_file_with_required_file_oapg( 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,13 +214,11 @@ def _upload_file_with_required_file_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -257,7 +237,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -296,28 +276,28 @@ class UploadFileWithRequiredFile(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -326,8 +306,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -337,22 +317,22 @@ def upload_file_with_required_file( 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -376,28 +356,28 @@ class ApiForpost(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -406,8 +386,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -417,22 +397,22 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200.py new file mode 100644 index 00000000000..55c94e2ea12 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ApiResponse + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 75% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py index ccf449dcfdd..14acb34990a 100644 --- 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/__init__.py @@ -25,52 +25,46 @@ 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 -) +from .. import path +from . import response_for_200 -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass +class RequestQueryParameters: + class Schemas: + someParam = schemas.AnyTypeSchema -request_query_some_param = api_client.QueryParameter( - name="someParam", - content={ - "application/json": SchemaForRequestParameterSomeParamApplicationJson, - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'someParam': typing.Union[Schemas.someParam, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) + + parameters = [ + api_client.QueryParameter( + name="someParam", + content={ + "application/json": Schemas.someParam, + }, + required=True, + ), + ] +_status_code_to_response = { + '200': response_for_200.response, +} _all_accept_content_types = ( 'application/json', ) @@ -80,20 +74,20 @@ class BaseApi(api_client.Api): @typing.overload def _query_param_with_json_content_type_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _query_param_with_json_content_type_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -102,19 +96,19 @@ def _query_param_with_json_content_type_oapg( @typing.overload def _query_param_with_json_content_type_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _query_param_with_json_content_type_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -126,13 +120,11 @@ def _query_param_with_json_content_type_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_some_param, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -177,20 +169,20 @@ class QueryParamWithJsonContentType(BaseApi): @typing.overload def query_param_with_json_content_type( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def query_param_with_json_content_type( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -199,19 +191,19 @@ def query_param_with_json_content_type( @typing.overload def query_param_with_json_content_type( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def query_param_with_json_content_type( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -232,20 +224,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -254,19 +246,19 @@ def get( @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.pyi index c829e40dd2d..0d85255ec49 100644 --- 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/__init__.pyi @@ -25,58 +25,42 @@ 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 -) +from . import response_for_200 -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass +class RequestQueryParameters: + class Schemas: + someParam = schemas.AnyTypeSchema -request_query_some_param = api_client.QueryParameter( - name="someParam", - content={ - "application/json": SchemaForRequestParameterSomeParamApplicationJson, - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'someParam': typing.Union[Schemas.someParam, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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 = ( + + parameters = [ + api_client.QueryParameter( + name="someParam", + content={ + "application/json": Schemas.someParam, + }, + required=True, + ), + ]_all_accept_content_types = ( 'application/json', ) @@ -85,20 +69,20 @@ class BaseApi(api_client.Api): @typing.overload def _query_param_with_json_content_type_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _query_param_with_json_content_type_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -107,19 +91,19 @@ def _query_param_with_json_content_type_oapg( @typing.overload def _query_param_with_json_content_type_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _query_param_with_json_content_type_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -131,13 +115,11 @@ def _query_param_with_json_content_type_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_some_param, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -182,20 +164,20 @@ class QueryParamWithJsonContentType(BaseApi): @typing.overload def query_param_with_json_content_type( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def query_param_with_json_content_type( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -204,19 +186,19 @@ def query_param_with_json_content_type( @typing.overload def query_param_with_json_content_type( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def query_param_with_json_content_type( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -237,20 +219,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -259,19 +241,19 @@ def get( @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200.py new file mode 100644 index 00000000000..90561be6384 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200.py @@ -0,0 +1,41 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + application_json = schemas.AnyTypeSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py index 6a5556eb380..38a002557c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py @@ -26,48 +26,44 @@ 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, -) +from .. import path +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + MapBeanSchema = Foo + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'mapBean': typing.Union[Schemas.MapBeanSchema, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=Schemas.MapBeanSchema, + explode=True, + ), + ] _status_code_to_response = { - '200': _response_for_200, + '200': response_for_200.response, } @@ -75,19 +71,19 @@ class BaseApi(api_client.Api): @typing.overload def _ref_object_in_query_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _ref_object_in_query_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -95,18 +91,18 @@ def _ref_object_in_query_oapg( @typing.overload def _ref_object_in_query_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _ref_object_in_query_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -117,13 +113,11 @@ def _ref_object_in_query_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -162,19 +156,19 @@ class RefObjectInQuery(BaseApi): @typing.overload def ref_object_in_query( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def ref_object_in_query( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -182,18 +176,18 @@ def ref_object_in_query( @typing.overload def ref_object_in_query( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def ref_object_in_query( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -212,19 +206,19 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -232,18 +226,18 @@ def get( @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 75% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.pyi index 70a37a3ac11..db270cc2235 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.pyi @@ -26,63 +26,59 @@ 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 -) +from . import response_for_200 -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass +class RequestQueryParameters: + class Schemas: + MapBeanSchema = Foo -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'mapBean': typing.Union[Schemas.MapBeanSchema, ], + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) + parameters = [ + api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=Schemas.MapBeanSchema, + explode=True, + ), + ] class BaseApi(api_client.Api): @typing.overload def _ref_object_in_query_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _ref_object_in_query_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -90,18 +86,18 @@ class BaseApi(api_client.Api): @typing.overload def _ref_object_in_query_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _ref_object_in_query_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -112,13 +108,11 @@ class BaseApi(api_client.Api): 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -157,19 +151,19 @@ class RefObjectInQuery(BaseApi): @typing.overload def ref_object_in_query( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def ref_object_in_query( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -177,18 +171,18 @@ class RefObjectInQuery(BaseApi): @typing.overload def ref_object_in_query( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def ref_object_in_query( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -207,19 +201,19 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -227,18 +221,18 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py index ac0fb2920f3..665a3e2a97c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.array_of_enums import ArrayOfEnums -# body param -SchemaForRequestBodyApplicationJson = ArrayOfEnums +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = ArrayOfEnums + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _array_of_enums_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ def _array_of_enums_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _array_of_enums_oapg( def _array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _array_of_enums_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -140,7 +131,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_array_of_enums.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -178,26 +169,26 @@ class ArrayOfEnums(BaseApi): def array_of_enums( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -206,7 +197,7 @@ def array_of_enums( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -216,20 +207,20 @@ def array_of_enums( def array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def array_of_enums( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -252,26 +243,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -280,7 +271,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -290,20 +281,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi index f8ec75ce3ef..5150a504a48 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.array_of_enums import ArrayOfEnums -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = ArrayOfEnums - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _array_of_enums_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ def _array_of_enums_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _array_of_enums_oapg( def _array_of_enums_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _array_of_enums_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -145,7 +126,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_array_of_enums.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -183,26 +164,26 @@ class ArrayOfEnums(BaseApi): def array_of_enums( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -211,7 +192,7 @@ def array_of_enums( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -221,20 +202,20 @@ def array_of_enums( def array_of_enums( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def array_of_enums( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -257,26 +238,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -285,7 +266,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -295,20 +276,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200.py new file mode 100644 index 00000000000..8bdb51cf3e8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ArrayOfEnums + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py index ed802fd8c6f..ed9e2d4e32c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.animal_farm import AnimalFarm -# body param -SchemaForRequestBodyApplicationJson = AnimalFarm +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = AnimalFarm + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _array_model_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _array_model_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ def _array_model_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _array_model_oapg( def _array_model_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _array_model_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -139,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -177,26 +168,26 @@ class ArrayModel(BaseApi): def array_model( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def array_model( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -205,7 +196,7 @@ def array_model( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -215,20 +206,20 @@ def array_model( def array_model( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def array_model( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -251,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -279,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -289,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi index cebbb40e5fc..33c48ad9941 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.animal_farm import AnimalFarm -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = AnimalFarm - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _array_model_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _array_model_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ def _array_model_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _array_model_oapg( def _array_model_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _array_model_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -144,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -182,26 +163,26 @@ class ArrayModel(BaseApi): def array_model( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def array_model( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -210,7 +191,7 @@ def array_model( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -220,20 +201,20 @@ def array_model( def array_model( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def array_model( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -256,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -284,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200.py new file mode 100644 index 00000000000..bfca2008375 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = AnimalFarm + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py index 7a975a27bc9..401be086bad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py @@ -25,35 +25,28 @@ from petstore_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema +from petstore_api.model.boolean import Boolean +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = Boolean + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -64,26 +57,26 @@ class BaseApi(api_client.Api): def _boolean_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _boolean_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -92,7 +85,7 @@ def _boolean_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -102,20 +95,20 @@ def _boolean_oapg( def _boolean_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _boolean_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -137,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -175,26 +168,26 @@ class Boolean(BaseApi): def boolean( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def boolean( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -203,7 +196,7 @@ def boolean( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -213,20 +206,20 @@ def boolean( def boolean( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def boolean( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -249,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -277,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -287,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 76% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi index 6eee57e2c63..4640be400ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi @@ -25,40 +25,23 @@ from petstore_api import schemas # noqa: F401 -from . import path +from petstore_api.model.boolean import Boolean -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = Boolean - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -69,26 +52,26 @@ class BaseApi(api_client.Api): def _boolean_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _boolean_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -97,7 +80,7 @@ def _boolean_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -107,20 +90,20 @@ def _boolean_oapg( def _boolean_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _boolean_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -142,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -180,26 +163,26 @@ class Boolean(BaseApi): def boolean( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def boolean( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -208,7 +191,7 @@ def boolean( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -218,20 +201,20 @@ def boolean( def boolean( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def boolean( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -254,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -282,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -292,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200.py new file mode 100644 index 00000000000..ec533ef13b8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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.boolean import Boolean + + +class BodySchemas: + # body schemas + application_json = Boolean + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py index 30d5f91dba2..17a062431ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -# body param -SchemaForRequestBodyApplicationJson = ComposedOneOfDifferentTypes +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = ComposedOneOfDifferentTypes + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _composed_one_of_different_types_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _composed_one_of_different_types_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _composed_one_of_different_types_oapg( def _composed_one_of_different_types_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _composed_one_of_different_types_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -139,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_composed_one_of_different_types.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -177,26 +168,26 @@ class ComposedOneOfDifferentTypes(BaseApi): def composed_one_of_different_types( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def composed_one_of_different_types( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -205,7 +196,7 @@ def composed_one_of_different_types( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -215,20 +206,20 @@ def composed_one_of_different_types( def composed_one_of_different_types( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def composed_one_of_different_types( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -251,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -279,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -289,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi index 84acaf17020..389e3f57519 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = ComposedOneOfDifferentTypes - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _composed_one_of_different_types_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _composed_one_of_different_types_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _composed_one_of_different_types_oapg( def _composed_one_of_different_types_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _composed_one_of_different_types_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -144,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_composed_one_of_different_types.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -182,26 +163,26 @@ class ComposedOneOfDifferentTypes(BaseApi): def composed_one_of_different_types( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def composed_one_of_different_types( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -210,7 +191,7 @@ def composed_one_of_different_types( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -220,20 +201,20 @@ def composed_one_of_different_types( def composed_one_of_different_types( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def composed_one_of_different_types( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -256,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -284,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200.py new file mode 100644 index 00000000000..fc2cae69019 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ComposedOneOfDifferentTypes + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py index ea4b1fe2ff5..8f03d0c8ecd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.string_enum import StringEnum -# body param -SchemaForRequestBodyApplicationJson = StringEnum +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = StringEnum + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _string_enum_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _string_enum_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ def _string_enum_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _string_enum_oapg( def _string_enum_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _string_enum_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -139,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -177,26 +168,26 @@ class StringEnum(BaseApi): def string_enum( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def string_enum( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -205,7 +196,7 @@ def string_enum( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -215,20 +206,20 @@ def string_enum( def string_enum( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def string_enum( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -251,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -279,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -289,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi index 4b953d05000..76432aeea5e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.string_enum import StringEnum -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = StringEnum - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _string_enum_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _string_enum_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ def _string_enum_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _string_enum_oapg( def _string_enum_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _string_enum_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -144,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -182,26 +163,26 @@ class StringEnum(BaseApi): def string_enum( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def string_enum( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -210,7 +191,7 @@ def string_enum( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -220,20 +201,20 @@ def string_enum( def string_enum( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def string_enum( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -256,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -284,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200.py new file mode 100644 index 00000000000..65a3feee344 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = StringEnum + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 81% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py index 24137e6fa53..d9e9f6cc462 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py @@ -27,36 +27,27 @@ from petstore_api.model.mammal import Mammal -# body param -SchemaForRequestBodyApplicationJson = Mammal +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = Mammal + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,34 +57,34 @@ class BaseApi(api_client.Api): @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -104,20 +95,20 @@ def _mammal_oapg( @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -142,7 +133,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -179,34 +170,34 @@ class Mammal(BaseApi): @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -217,20 +208,20 @@ def mammal( @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -253,34 +244,34 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -291,20 +282,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi index dfeb527472f..a279e0a65a4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi @@ -27,41 +27,22 @@ from petstore_api.model.mammal import Mammal -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = Mammal - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,34 +52,34 @@ class BaseApi(api_client.Api): @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -109,20 +90,20 @@ def _mammal_oapg( @typing.overload def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _mammal_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,7 +128,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -184,34 +165,34 @@ class Mammal(BaseApi): @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -222,20 +203,20 @@ def mammal( @typing.overload def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def mammal( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -258,34 +239,34 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -296,20 +277,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200.py new file mode 100644 index 00000000000..2fd3e77ef58 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = Mammal + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py index 8fb5defd566..02915fddf42 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.number_with_validations import NumberWithValidations -# body param -SchemaForRequestBodyApplicationJson = NumberWithValidations +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = NumberWithValidations + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _number_with_validations_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _number_with_validations_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ def _number_with_validations_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _number_with_validations_oapg( def _number_with_validations_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _number_with_validations_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -139,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -177,26 +168,26 @@ class NumberWithValidations(BaseApi): def number_with_validations( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def number_with_validations( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -205,7 +196,7 @@ def number_with_validations( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -215,20 +206,20 @@ def number_with_validations( def number_with_validations( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def number_with_validations( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -251,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -279,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -289,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi index ab8e5088e51..ab5aae6b249 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.number_with_validations import NumberWithValidations -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = NumberWithValidations - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _number_with_validations_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _number_with_validations_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ def _number_with_validations_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _number_with_validations_oapg( def _number_with_validations_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _number_with_validations_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -144,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -182,26 +163,26 @@ class NumberWithValidations(BaseApi): def number_with_validations( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def number_with_validations( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -210,7 +191,7 @@ def number_with_validations( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -220,20 +201,20 @@ def number_with_validations( def number_with_validations( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def number_with_validations( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -256,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -284,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200.py new file mode 100644 index 00000000000..9d27aded28f --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = NumberWithValidations + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py index 7ad3021226b..777bdc99da7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py @@ -27,35 +27,26 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -# body param -SchemaForRequestBodyApplicationJson = ObjectModelWithRefProps +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = ObjectModelWithRefProps + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -66,26 +57,26 @@ class BaseApi(api_client.Api): def _object_model_with_ref_props_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _object_model_with_ref_props_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -94,7 +85,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -104,20 +95,20 @@ def _object_model_with_ref_props_oapg( def _object_model_with_ref_props_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _object_model_with_ref_props_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -139,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -177,26 +168,26 @@ class ObjectModelWithRefProps(BaseApi): def object_model_with_ref_props( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def object_model_with_ref_props( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -205,7 +196,7 @@ def object_model_with_ref_props( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -215,20 +206,20 @@ def object_model_with_ref_props( def object_model_with_ref_props( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def object_model_with_ref_props( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -251,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -279,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -289,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi index 9df4ea7f154..e3e487efa89 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi @@ -27,40 +27,21 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_json = ObjectModelWithRefProps - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -71,26 +52,26 @@ class BaseApi(api_client.Api): def _object_model_with_ref_props_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _object_model_with_ref_props_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -99,7 +80,7 @@ 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, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -109,20 +90,20 @@ def _object_model_with_ref_props_oapg( def _object_model_with_ref_props_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _object_model_with_ref_props_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -144,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -182,26 +163,26 @@ class ObjectModelWithRefProps(BaseApi): def object_model_with_ref_props( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def object_model_with_ref_props( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -210,7 +191,7 @@ def object_model_with_ref_props( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -220,20 +201,20 @@ def object_model_with_ref_props( def object_model_with_ref_props( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def object_model_with_ref_props( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -256,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -284,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200.py new file mode 100644 index 00000000000..24c4fa41ff6 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ObjectModelWithRefProps + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py index 0e7d1fb36c1..faacfc29015 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py @@ -25,35 +25,28 @@ from petstore_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema +from petstore_api.model.string import String +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = String + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) -_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.response, +} _all_accept_content_types = ( 'application/json', ) @@ -64,26 +57,26 @@ class BaseApi(api_client.Api): def _string_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _string_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -92,7 +85,7 @@ def _string_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -102,20 +95,20 @@ def _string_oapg( def _string_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _string_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -137,7 +130,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -175,26 +168,26 @@ class String(BaseApi): def string( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def string( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -203,7 +196,7 @@ def string( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -213,20 +206,20 @@ def string( def string( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def string( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -249,26 +242,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -277,7 +270,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -287,20 +280,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 76% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi index 6e12c6a77c7..5e269b88243 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi @@ -25,40 +25,23 @@ from petstore_api import schemas # noqa: F401 -from . import path +from petstore_api.model.string import String -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_json = String - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -69,26 +52,26 @@ class BaseApi(api_client.Api): def _string_oapg( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _string_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -97,7 +80,7 @@ def _string_oapg( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -107,20 +90,20 @@ def _string_oapg( def _string_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _string_oapg( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -142,7 +125,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -180,26 +163,26 @@ class String(BaseApi): def string( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def string( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -208,7 +191,7 @@ def string( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -218,20 +201,20 @@ def string( def string( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def string( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -254,26 +237,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -282,7 +265,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -292,20 +275,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.application_json, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200.py new file mode 100644 index 00000000000..084ff9dca08 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 import String + + +class BodySchemas: + # body schemas + application_json = String + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 92% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/__init__.py index ecb63bdc8e2..722b724522c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/__init__.py @@ -25,25 +25,13 @@ from petstore_api import schemas # noqa: F401 +from .. import path +from . import response_for_200 -@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.response, +} _all_accept_content_types = ( 'application/json', 'application/xml', @@ -59,7 +47,7 @@ def _response_without_schema_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -79,7 +67,7 @@ def _response_without_schema_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -138,7 +126,7 @@ def response_without_schema( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -158,7 +146,7 @@ def response_without_schema( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -188,7 +176,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -208,7 +196,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 91% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/__init__.pyi index f62d1360ba0..05c85e9b0b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/__init__.pyi @@ -25,30 +25,8 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_200 - - -@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', @@ -64,7 +42,7 @@ def _response_without_schema_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -84,7 +62,7 @@ def _response_without_schema_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -143,7 +121,7 @@ def response_without_schema( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -163,7 +141,7 @@ def response_without_schema( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -193,7 +171,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload @@ -213,7 +191,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200.py new file mode 100644 index 00000000000..e31f6c2fbbc --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200.py @@ -0,0 +1,42 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + schemas.Unset, + schemas.Unset, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + ), + 'application/xml': api_client.MediaType( + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py new file mode 100644 index 00000000000..ffcd42d9469 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py @@ -0,0 +1,404 @@ +# 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 +from . import response_for_200 + + + +class RequestQueryParameters: + class Schemas: + + + 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 + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'pipe': typing.Union[Schemas.PipeSchema, list, tuple, ], + 'ioutil': typing.Union[Schemas.IoutilSchema, list, tuple, ], + 'http': typing.Union[Schemas.HttpSchema, list, tuple, ], + 'url': typing.Union[Schemas.UrlSchema, list, tuple, ], + 'context': typing.Union[Schemas.ContextSchema, list, tuple, ], + 'refParam': typing.Union[Schemas.RefParamSchema, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="pipe", + style=api_client.ParameterStyle.FORM, + schema=Schemas.PipeSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="ioutil", + style=api_client.ParameterStyle.FORM, + schema=Schemas.IoutilSchema, + required=True, + ), + api_client.QueryParameter( + name="http", + style=api_client.ParameterStyle.SPACE_DELIMITED, + schema=Schemas.HttpSchema, + required=True, + ), + api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=Schemas.UrlSchema, + required=True, + ), + api_client.QueryParameter( + name="context", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ContextSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="refParam", + style=api_client.ParameterStyle.FORM, + schema=Schemas.RefParamSchema, + required=True, + explode=True, + ), + ] +_status_code_to_response = { + '200': response_for_200.response, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParameters.Params = 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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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(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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def query_parameter_collection_format( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def query_parameter_collection_format( + self, + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + query_params: RequestQueryParameters.Params = 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_paramters/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi new file mode 100644 index 00000000000..fc5451fed6f --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi @@ -0,0 +1,399 @@ +# 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 response_for_200 + + + +class RequestQueryParameters: + class Schemas: + + + 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 + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'pipe': typing.Union[Schemas.PipeSchema, list, tuple, ], + 'ioutil': typing.Union[Schemas.IoutilSchema, list, tuple, ], + 'http': typing.Union[Schemas.HttpSchema, list, tuple, ], + 'url': typing.Union[Schemas.UrlSchema, list, tuple, ], + 'context': typing.Union[Schemas.ContextSchema, list, tuple, ], + 'refParam': typing.Union[Schemas.RefParamSchema, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="pipe", + style=api_client.ParameterStyle.FORM, + schema=Schemas.PipeSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="ioutil", + style=api_client.ParameterStyle.FORM, + schema=Schemas.IoutilSchema, + required=True, + ), + api_client.QueryParameter( + name="http", + style=api_client.ParameterStyle.SPACE_DELIMITED, + schema=Schemas.HttpSchema, + required=True, + ), + api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=Schemas.UrlSchema, + required=True, + ), + api_client.QueryParameter( + name="context", + style=api_client.ParameterStyle.FORM, + schema=Schemas.ContextSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="refParam", + style=api_client.ParameterStyle.FORM, + schema=Schemas.RefParamSchema, + required=True, + explode=True, + ), + ] + +class BaseApi(api_client.Api): + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParameters.Params = 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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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(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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def query_parameter_collection_format( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def query_parameter_collection_format( + self, + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + query_params: RequestQueryParameters.Params = 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_paramters/put/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 76% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py index a6086fbd0d9..c9ccdb31147 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py @@ -25,36 +25,27 @@ from petstore_api import schemas # noqa: F401 -# body param -SchemaForRequestBodyApplicationOctetStream = schemas.BinarySchema +from .. import path +from . import response_for_200 -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 +class RequestBody: + class Schemas: + application_octet_stream = schemas.BinarySchema + parameter = api_client.RequestBody( + content={ + 'application/octet-stream': api_client.MediaType( + schema=Schemas.application_octet_stream + ), + }, + required=True, + ) -_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.response, +} _all_accept_content_types = ( 'application/octet-stream', ) @@ -64,34 +55,34 @@ class BaseApi(api_client.Api): @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -102,20 +93,20 @@ def _upload_download_file_oapg( @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -141,7 +132,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -178,34 +169,34 @@ class UploadDownloadFile(BaseApi): @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -216,20 +207,20 @@ def upload_download_file( @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -252,34 +243,34 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -290,20 +281,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, 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/__init__.pyi similarity index 76% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi index 9686e6ede5c..eab65e6c7c9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi @@ -25,41 +25,22 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_200 -# 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 +class RequestBody: + class Schemas: + application_octet_stream = schemas.BinarySchema - -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/octet-stream': api_client.MediaType( + schema=Schemas.application_octet_stream + ), + }, + required=True, + ) _all_accept_content_types = ( 'application/octet-stream', ) @@ -69,34 +50,34 @@ class BaseApi(api_client.Api): @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -107,20 +88,20 @@ def _upload_download_file_oapg( @typing.overload def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _upload_download_file_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -146,7 +127,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -183,34 +164,34 @@ class UploadDownloadFile(BaseApi): @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -221,20 +202,20 @@ def upload_download_file( @typing.overload def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def upload_download_file( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -257,34 +238,34 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -295,20 +276,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + body: typing.Union[RequestBody.Schemas.application_octet_stream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200.py new file mode 100644 index 00000000000..d2427b782b5 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200.py @@ -0,0 +1,41 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + application_octet_stream = schemas.BinarySchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_octet_stream, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/octet-stream': api_client.MediaType( + schema=BodySchemas.application_octet_stream, + ), + }, +) 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/__init__.py similarity index 61% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py index c77969fbf70..0b40b9a1edb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py @@ -25,101 +25,90 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.api_response import ApiResponse +from .. import path +from . import response_for_200 -# body param -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "file", - } +class RequestBody: + class Schemas: - 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), - }, -) + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + file=file, + additionalMetadata=additionalMetadata, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} _all_accept_content_types = ( 'application/json', ) @@ -130,26 +119,26 @@ class BaseApi(api_client.Api): def _upload_file_oapg( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_file_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -158,7 +147,7 @@ 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -168,20 +157,20 @@ def _upload_file_oapg( def _upload_file_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -204,7 +193,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -242,26 +231,26 @@ class UploadFile(BaseApi): def upload_file( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_file( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -270,7 +259,7 @@ def upload_file( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -280,20 +269,20 @@ def upload_file( def upload_file( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def upload_file( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -316,26 +305,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -344,7 +333,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -354,20 +343,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, 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/__init__.pyi similarity index 61% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi index 867654e95f3..b96a31b06dd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi @@ -25,106 +25,85 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.api_response import ApiResponse +from . import response_for_200 -from . import path -# body param - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "file", - } +class RequestBody: + class Schemas: - 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, -} + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + file=file, + additionalMetadata=additionalMetadata, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -135,26 +114,26 @@ class BaseApi(api_client.Api): def _upload_file_oapg( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_file_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -163,7 +142,7 @@ 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -173,20 +152,20 @@ def _upload_file_oapg( def _upload_file_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -209,7 +188,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -247,26 +226,26 @@ class UploadFile(BaseApi): def upload_file( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_file( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -275,7 +254,7 @@ def upload_file( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -285,20 +264,20 @@ def upload_file( def upload_file( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def upload_file( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -321,26 +300,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -349,7 +328,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -359,20 +338,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200.py new file mode 100644 index 00000000000..55c94e2ea12 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ApiResponse + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 61% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py index 2b1e1f508f3..c44aa625c78 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py @@ -25,108 +25,97 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.api_response import ApiResponse +from .. import path +from . import response_for_200 -# body param -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: +class RequestBody: + class Schemas: + - class properties: + class multipart_form_data( + 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: ... - class files( - schemas.ListSchema - ): + @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) - 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, - ) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ... - 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), - }, -) + @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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + files=files, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) + +_status_code_to_response = { + '200': response_for_200.response, +} _all_accept_content_types = ( 'application/json', ) @@ -137,26 +126,26 @@ class BaseApi(api_client.Api): def _upload_files_oapg( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_files_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -165,7 +154,7 @@ 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -175,20 +164,20 @@ def _upload_files_oapg( def _upload_files_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -211,7 +200,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -249,26 +238,26 @@ class UploadFiles(BaseApi): def upload_files( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_files( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -277,7 +266,7 @@ def upload_files( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -287,20 +276,20 @@ def upload_files( def upload_files( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def upload_files( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -323,26 +312,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -351,7 +340,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -361,20 +350,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, 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/__init__.pyi similarity index 61% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi index 4284b0119ce..2f0fc18a23b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi @@ -25,113 +25,92 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.api_response import ApiResponse +from . import response_for_200 -from . import path -# body param - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: +class RequestBody: + class Schemas: + + + class multipart_form_data( + schemas.DictSchema + ): + - class properties: + 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: ... - class files( - schemas.ListSchema - ): + @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) - 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, - ) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ... - 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, -} + @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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + files=files, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -142,26 +121,26 @@ class BaseApi(api_client.Api): def _upload_files_oapg( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _upload_files_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -170,7 +149,7 @@ 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -180,20 +159,20 @@ def _upload_files_oapg( def _upload_files_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, 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, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -216,7 +195,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -254,26 +233,26 @@ class UploadFiles(BaseApi): def upload_files( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def upload_files( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -282,7 +261,7 @@ def upload_files( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -292,20 +271,20 @@ def upload_files( def upload_files( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def upload_files( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -328,26 +307,26 @@ class ApiForpost(BaseApi): def post( self, content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, ]: ... @@ -356,7 +335,7 @@ def post( self, skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, @@ -366,20 +345,20 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + body: typing.Union[RequestBody.Schemas.multipart_form_data, 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, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200.py new file mode 100644 index 00000000000..55c94e2ea12 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ApiResponse + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.py new file mode 100644 index 00000000000..64ce3f3b439 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.py @@ -0,0 +1,219 @@ +# 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 +from . import response_for_default + + +_status_code_to_response = { + 'default': response_for_default.response, +} +_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[ + response_for_default.ApiResponse, + ]: ... + + @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[ + response_for_default.ApiResponse, + 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(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[ + response_for_default.ApiResponse, + ]: ... + + @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[ + response_for_default.ApiResponse, + 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[ + response_for_default.ApiResponse, + ]: ... + + @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[ + response_for_default.ApiResponse, + 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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.pyi new file mode 100644 index 00000000000..0ff160bbb36 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/__init__.pyi @@ -0,0 +1,214 @@ +# 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 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[ + response_for_default.ApiResponse, + ]: ... + + @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[ + response_for_default.ApiResponse, + 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(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[ + response_for_default.ApiResponse, + ]: ... + + @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[ + response_for_default.ApiResponse, + 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[ + response_for_default.ApiResponse, + ]: ... + + @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[ + response_for_default.ApiResponse, + 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/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py new file mode 100644 index 00000000000..d403500ea4a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py @@ -0,0 +1,95 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + + + class application_json( + 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], + ) -> 'application_json': + return super().__new__( + cls, + *args, + string=string, + _configuration=_configuration, + **kwargs, + ) + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 76% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py index eab76eab725..d1ac56e3a4d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py @@ -27,26 +27,34 @@ from petstore_api.model.pet import Pet -from . import path +from .. import path +from . import response_for_200 +from . import response_for_405 -# 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, -) +class RequestBody: + class Schemas: + application_json = Pet + application_xml = Pet + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + 'application/xml': api_client.MediaType( + schema=Schemas.application_xml + ), + }, + required=True, + ) + _auth = [ 'http_signature_test', 'petstore_auth', ] + _servers = ( { 'url': "https://petstore.swagger.io/v2", @@ -58,32 +66,9 @@ }, ) - -@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, + '200': response_for_200.response, + '405': response_for_405.response, } @@ -91,47 +76,47 @@ class BaseApi(api_client.Api): @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -142,20 +127,20 @@ def _add_pet_oapg( @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -178,7 +163,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -219,47 +204,47 @@ class AddPet(BaseApi): @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -270,20 +255,20 @@ def add_pet( @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -306,47 +291,47 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -357,20 +342,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, 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/__init__.pyi similarity index 76% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi index 844a49f7094..8d855b69484 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi @@ -27,91 +27,74 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.pet import Pet -# body param -SchemaForRequestBodyApplicationJson = Pet -SchemaForRequestBodyApplicationXml = Pet +from . import response_for_200 +from . import response_for_405 -request_body_pet = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'application/xml': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXml), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = Pet + application_xml = Pet -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + 'application/xml': api_client.MediaType( + schema=Schemas.application_xml + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -122,20 +105,20 @@ class BaseApi(api_client.Api): @typing.overload def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _add_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -158,7 +141,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -199,47 +182,47 @@ class AddPet(BaseApi): @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -250,20 +233,20 @@ class AddPet(BaseApi): @typing.overload def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def add_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -286,47 +269,47 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -337,20 +320,20 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py index 925cf095100..d1bd29e254b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py @@ -27,63 +27,58 @@ 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), +from .. import path +from . import response_for_400 +from . import response_for_404 +from . import response_for_405 + + + +class RequestBody: + class Schemas: + application_json = Pet + application_xml = Pet + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + 'application/xml': api_client.MediaType( + schema=Schemas.application_xml + ), + }, + required=True, + ) + +_auth = [ + 'http_signature_test', + 'petstore_auth', +] + +_servers = ( + { + 'url': "https://petstore.swagger.io/v2", + 'description': "No description provided", + }, + { + 'url': "https://path-server-test.petstore.local/v2", + 'description': "No description provided", }, - 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, -) +_status_code_to_response = { + '400': response_for_400.response, + '404': response_for_404.response, + '405': response_for_405.response, +} class BaseApi(api_client.Api): @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -93,7 +88,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], content_type: typing_extensions.Literal["application/xml"], host_index: typing.Optional[int] = None, stream: bool = False, @@ -103,7 +98,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -114,7 +109,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -125,7 +120,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -137,7 +132,7 @@ def _update_pet_oapg( def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -160,7 +155,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -201,7 +196,7 @@ class UpdatePet(BaseApi): @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -211,7 +206,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], content_type: typing_extensions.Literal["application/xml"], host_index: typing.Optional[int] = None, stream: bool = False, @@ -221,7 +216,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -232,7 +227,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -243,7 +238,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -255,7 +250,7 @@ def update_pet( def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -278,7 +273,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -288,7 +283,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], content_type: typing_extensions.Literal["application/xml"], host_index: typing.Optional[int] = None, stream: bool = False, @@ -298,7 +293,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -309,7 +304,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -320,7 +315,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -332,7 +327,7 @@ def put( def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, 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/__init__.pyi similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi index 455320b56c9..9ec97b5077c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi @@ -27,84 +27,35 @@ 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 = [ - 'http_signature_test', - 'petstore_auth', -] -_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, -} +from . import response_for_400 +from . import response_for_404 +from . import response_for_405 + + + +class RequestBody: + class Schemas: + application_json = Pet + application_xml = Pet + + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + 'application/xml': api_client.MediaType( + schema=Schemas.application_xml + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -114,7 +65,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], content_type: typing_extensions.Literal["application/xml"], host_index: typing.Optional[int] = None, stream: bool = False, @@ -124,7 +75,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -135,7 +86,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -146,7 +97,7 @@ def _update_pet_oapg( @typing.overload def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -158,7 +109,7 @@ def _update_pet_oapg( def _update_pet_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -181,7 +132,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -222,7 +173,7 @@ class UpdatePet(BaseApi): @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -232,7 +183,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], content_type: typing_extensions.Literal["application/xml"], host_index: typing.Optional[int] = None, stream: bool = False, @@ -242,7 +193,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -253,7 +204,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -264,7 +215,7 @@ def update_pet( @typing.overload def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -276,7 +227,7 @@ def update_pet( def update_pet( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -299,7 +250,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -309,7 +260,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_xml,], content_type: typing_extensions.Literal["application/xml"], host_index: typing.Optional[int] = None, stream: bool = False, @@ -319,7 +270,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -330,7 +281,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., host_index: typing.Optional[int] = None, @@ -341,7 +292,7 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = ..., host_index: typing.Optional[int] = None, stream: bool = False, @@ -353,7 +304,7 @@ def put( def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + body: typing.Union[RequestBody.Schemas.application_json,RequestBody.Schemas.application_xml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py new file mode 100644 index 00000000000..f3c9f4801a3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py @@ -0,0 +1,330 @@ +# 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 +from . import response_for_200 +from . import response_for_400 + + + +class RequestQueryParameters: + class Schemas: + + + 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) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'status': typing.Union[Schemas.StatusSchema, list, tuple, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="status", + style=api_client.ParameterStyle.FORM, + schema=Schemas.StatusSchema, + required=True, + ), + ] +_auth = [ + 'http_signature_test', + 'petstore_auth', +] + +_status_code_to_response = { + '200': response_for_200.response, + '400': response_for_400.response, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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(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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def find_pets_by_status( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_status( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi new file mode 100644 index 00000000000..73cf13573ea --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi @@ -0,0 +1,311 @@ +# 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 response_for_200 +from . import response_for_400 + + + +class RequestQueryParameters: + class Schemas: + + + 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) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'status': typing.Union[Schemas.StatusSchema, list, tuple, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="status", + style=api_client.ParameterStyle.FORM, + schema=Schemas.StatusSchema, + required=True, + ), + ]_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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(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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def find_pets_by_status( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_status( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200.py new file mode 100644 index 00000000000..149afb6194c --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200.py @@ -0,0 +1,98 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + + + class application_xml( + 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, + ) -> 'application_xml': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Pet': + return super().__getitem__(i) + + + class application_json( + 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, + ) -> 'application_json': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Pet': + return super().__getitem__(i) + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py new file mode 100644 index 00000000000..4f759682a41 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py @@ -0,0 +1,305 @@ +# 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 +from . import response_for_200 +from . import response_for_400 + + + +class RequestQueryParameters: + class Schemas: + + + 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) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'tags': typing.Union[Schemas.TagsSchema, list, tuple, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="tags", + style=api_client.ParameterStyle.FORM, + schema=Schemas.TagsSchema, + required=True, + ), + ] +_auth = [ + 'http_signature_test', + 'petstore_auth', +] + +_status_code_to_response = { + '200': response_for_200.response, + '400': response_for_400.response, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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(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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def find_pets_by_tags( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_tags( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi new file mode 100644 index 00000000000..b9176cbcf40 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi @@ -0,0 +1,294 @@ +# 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 response_for_200 +from . import response_for_400 + + + +class RequestQueryParameters: + class Schemas: + + + 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) + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'tags': typing.Union[Schemas.TagsSchema, list, tuple, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="tags", + style=api_client.ParameterStyle.FORM, + schema=Schemas.TagsSchema, + required=True, + ), + ]_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_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(RequestQueryParameters.Params, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in RequestQueryParameters.parameters: + 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(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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def find_pets_by_tags( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_tags( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParameters.Params = 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: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + response_for_200.ApiResponse, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParameters.Params = frozendict.frozendict(), + accept_content_types: typing.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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200.py new file mode 100644 index 00000000000..149afb6194c --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200.py @@ -0,0 +1,98 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + + + class application_xml( + 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, + ) -> 'application_xml': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Pet': + return super().__getitem__(i) + + + class application_json( + 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, + ) -> 'application_json': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Pet': + return super().__getitem__(i) + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 63% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.py index eb9bc416c00..a4b139bc3a1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.py @@ -25,77 +25,88 @@ 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, -) +from .. import path +from . import response_for_400 + + + +class RequestHeaderParameters: + class Schemas: + ApiKeySchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'api_key': typing.Union[Schemas.ApiKeySchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="api_key", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ApiKeySchema, + ), + ] + +class RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), + ] +_auth = [ + 'petstore_auth', +] + +_status_code_to_response = { + '400': response_for_400.response, +} class BaseApi(api_client.Api): @typing.overload def _delete_pet_oapg( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -104,8 +115,8 @@ def _delete_pet_oapg( def _delete_pet_oapg( self, skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -113,8 +124,8 @@ def _delete_pet_oapg( @typing.overload def _delete_pet_oapg( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -124,8 +135,8 @@ def _delete_pet_oapg( def _delete_pet_oapg( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -136,14 +147,12 @@ def _delete_pet_oapg( 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) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -154,9 +163,7 @@ class instances used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() - for parameter in ( - request_header_api_key, - ): + for parameter in RequestHeaderParameters.parameters: parameter_data = header_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -194,8 +201,8 @@ class DeletePet(BaseApi): @typing.overload def delete_pet( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -204,8 +211,8 @@ def delete_pet( def delete_pet( self, skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -213,8 +220,8 @@ def delete_pet( @typing.overload def delete_pet( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -224,8 +231,8 @@ def delete_pet( def delete_pet( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -245,8 +252,8 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -255,8 +262,8 @@ def delete( def delete( self, skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -264,8 +271,8 @@ def delete( @typing.overload def delete( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -275,8 +282,8 @@ def delete( def delete( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 64% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.pyi index 3651dff1d3b..e9b87bf0a47 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.pyi @@ -25,85 +25,79 @@ 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, -} +from . import response_for_400 + +class RequestHeaderParameters: + class Schemas: + ApiKeySchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'api_key': typing.Union[Schemas.ApiKeySchema, str, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="api_key", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.ApiKeySchema, + ), + ] + +class RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), + ] + class BaseApi(api_client.Api): @typing.overload def _delete_pet_oapg( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -112,8 +106,8 @@ def _delete_pet_oapg( def _delete_pet_oapg( self, skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -121,8 +115,8 @@ def _delete_pet_oapg( @typing.overload def _delete_pet_oapg( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -132,8 +126,8 @@ def _delete_pet_oapg( def _delete_pet_oapg( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -144,14 +138,12 @@ def _delete_pet_oapg( 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) + self._verify_typed_dict_inputs_oapg(RequestHeaderParameters.Params, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -162,9 +154,7 @@ class instances used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() - for parameter in ( - request_header_api_key, - ): + for parameter in RequestHeaderParameters.parameters: parameter_data = header_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -202,8 +192,8 @@ class DeletePet(BaseApi): @typing.overload def delete_pet( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -212,8 +202,8 @@ def delete_pet( def delete_pet( self, skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -221,8 +211,8 @@ def delete_pet( @typing.overload def delete_pet( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -232,8 +222,8 @@ def delete_pet( def delete_pet( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -253,8 +243,8 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -263,8 +253,8 @@ def delete( def delete( self, skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -272,8 +262,8 @@ def delete( @typing.overload def delete( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -283,8 +273,8 @@ def delete( def delete( self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), + header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.py index 5ae107f3242..d3c837709bc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.py @@ -25,81 +25,53 @@ 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 +from .. import path +from . import response_for_200 +from . import response_for_400 +from . import response_for_404 -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 +class RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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, -) + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), + ] +_auth = [ + 'api_key', +] + +_status_code_to_response = { + '200': response_for_200.response, + '400': response_for_400.response, + '404': response_for_404.response, +} _all_accept_content_types = ( 'application/xml', 'application/json', @@ -110,20 +82,20 @@ class BaseApi(api_client.Api): @typing.overload def _get_pet_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _get_pet_by_id_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -132,19 +104,19 @@ def _get_pet_by_id_oapg( @typing.overload def _get_pet_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _get_pet_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -156,13 +128,11 @@ def _get_pet_by_id_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -208,20 +178,20 @@ class GetPetById(BaseApi): @typing.overload def get_pet_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get_pet_by_id( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -230,19 +200,19 @@ def get_pet_by_id( @typing.overload def get_pet_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get_pet_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -263,20 +233,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -285,19 +255,19 @@ def get( @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.pyi index 9dc1735114e..914125f614b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.pyi @@ -25,92 +25,43 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.pet import Pet +from . import response_for_200 +from . import response_for_400 +from . import response_for_404 -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 +class RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema -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), - }, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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 = ( + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), + ]_all_accept_content_types = ( 'application/xml', 'application/json', ) @@ -120,20 +71,20 @@ class BaseApi(api_client.Api): @typing.overload def _get_pet_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _get_pet_by_id_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -142,19 +93,19 @@ def _get_pet_by_id_oapg( @typing.overload def _get_pet_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _get_pet_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,13 +117,11 @@ def _get_pet_by_id_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -218,20 +167,20 @@ class GetPetById(BaseApi): @typing.overload def get_pet_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get_pet_by_id( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -240,19 +189,19 @@ def get_pet_by_id( @typing.overload def get_pet_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get_pet_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -273,20 +222,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -295,19 +244,19 @@ def get( @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200.py new file mode 100644 index 00000000000..632ed1944b6 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200.py @@ -0,0 +1,48 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_xml = Pet + application_json = Pet + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 53% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py index f2be056a388..bcf670f5c8f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py @@ -25,113 +25,121 @@ 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 -) +from .. import path +from . import response_for_405 -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass +class RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): + class Params(RequiredParams, OptionalParams): + pass - 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), - }, -) + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), + ] -@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 RequestBody: + class Schemas: + + + class application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + return super().__new__( + cls, + *args, + name=name, + status=status, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) + +_auth = [ + 'petstore_auth', +] + +_status_code_to_response = { + '405': response_for_405.response, +} class BaseApi(api_client.Api): @@ -139,8 +147,8 @@ class BaseApi(api_client.Api): 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -149,8 +157,8 @@ def _update_pet_with_form_oapg( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -161,8 +169,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -171,8 +179,8 @@ def _update_pet_with_form_oapg( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -183,8 +191,8 @@ def _update_pet_with_form_oapg( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -195,13 +203,11 @@ def _update_pet_with_form_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -217,7 +223,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -256,8 +262,8 @@ class UpdatePetWithForm(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -266,8 +272,8 @@ def update_pet_with_form( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -278,8 +284,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -288,8 +294,8 @@ def update_pet_with_form( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -300,8 +306,8 @@ def update_pet_with_form( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -323,8 +329,8 @@ class ApiForpost(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -333,8 +339,8 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -345,8 +351,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -355,8 +361,8 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -367,8 +373,8 @@ def post( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 53% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi index 101ac83216f..7aa82c5a33f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi @@ -25,121 +25,112 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_405 -# 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 +class RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): + class Params(RequiredParams, OptionalParams): + pass - 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', -] + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), + ] - -@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 RequestBody: + class Schemas: + + + class application_x_www_form_urlencoded( + 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], + ) -> 'application_x_www_form_urlencoded': + return super().__new__( + cls, + *args, + name=name, + status=status, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=Schemas.application_x_www_form_urlencoded + ), + }, + ) class BaseApi(api_client.Api): @@ -147,8 +138,8 @@ class BaseApi(api_client.Api): 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -157,8 +148,8 @@ def _update_pet_with_form_oapg( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -169,8 +160,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -179,8 +170,8 @@ def _update_pet_with_form_oapg( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -191,8 +182,8 @@ def _update_pet_with_form_oapg( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -203,13 +194,11 @@ def _update_pet_with_form_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -225,7 +214,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -264,8 +253,8 @@ class UpdatePetWithForm(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -274,8 +263,8 @@ def update_pet_with_form( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -286,8 +275,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -296,8 +285,8 @@ def update_pet_with_form( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -308,8 +297,8 @@ def update_pet_with_form( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -331,8 +320,8 @@ class ApiForpost(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -341,8 +330,8 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -353,8 +342,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -363,8 +352,8 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -375,8 +364,8 @@ def post( 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(), + body: typing.Union[RequestBody.Schemas.application_x_www_form_urlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 55% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py index 84c05ddf6ee..2ca5f36bbb4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py @@ -25,122 +25,121 @@ 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 -) - +from .. import path +from . import response_for_200 -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 RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema - 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, - ) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse + class Params(RequiredParams, OptionalParams): + pass -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), ] - headers: schemas.Unset = schemas.unset - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) +class RequestBody: + class Schemas: + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + additionalMetadata=additionalMetadata, + file=file, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) + +_auth = [ + 'petstore_auth', +] + +_status_code_to_response = { + '200': response_for_200.response, +} _all_accept_content_types = ( 'application/json', ) @@ -151,28 +150,28 @@ class BaseApi(api_client.Api): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -181,8 +180,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -192,22 +191,22 @@ def _upload_image_oapg( def _upload_image_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -219,13 +218,11 @@ def _upload_image_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -244,7 +241,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -283,28 +280,28 @@ class UploadImage(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -313,8 +310,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -324,22 +321,22 @@ def upload_image( def upload_image( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -363,28 +360,28 @@ class ApiForpost(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -393,8 +390,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -404,22 +401,22 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 56% rename from samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.pyi index 196f0beccff..dc3a232ae14 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.pyi @@ -25,130 +25,112 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.api_response import ApiResponse +from . import response_for_200 -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 RequestPathParameters: + class Schemas: + PetIdSchema = schemas.Int64Schema -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, - ) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'petstore_auth', -] -SchemaFor200ResponseBodyApplicationJson = ApiResponse + class Params(RequiredParams, OptionalParams): + pass -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, + parameters = [ + api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.PetIdSchema, + required=True, + ), ] - 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, -} +class RequestBody: + class Schemas: + + + class multipart_form_data( + 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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + additionalMetadata=additionalMetadata, + file=file, + _configuration=_configuration, + **kwargs, + ) + + parameter = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=Schemas.multipart_form_data + ), + }, + ) _all_accept_content_types = ( 'application/json', ) @@ -159,28 +141,28 @@ class BaseApi(api_client.Api): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -189,8 +171,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -200,22 +182,22 @@ def _upload_image_oapg( def _upload_image_oapg( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,13 +209,11 @@ def _upload_image_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_pet_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -252,7 +232,7 @@ class instances _fields = None _body = None if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -291,28 +271,28 @@ class UploadImage(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -321,8 +301,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -332,22 +312,22 @@ def upload_image( def upload_image( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -371,28 +351,28 @@ class ApiForpost(BaseApi): 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @@ -401,8 +381,8 @@ 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -412,22 +392,22 @@ def post( def post( self, content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, 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(), + body: typing.Union[RequestBody.Schemas.multipart_form_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200.py new file mode 100644 index 00000000000..55c94e2ea12 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200.py @@ -0,0 +1,43 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_json = ApiResponse + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.py new file mode 100644 index 00000000000..50b42404caf --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.py @@ -0,0 +1,221 @@ +# 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 +from . import response_for_200 + + +_auth = [ + 'api_key', +] + +_status_code_to_response = { + '200': response_for_200.response, +} +_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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.pyi new file mode 100644 index 00000000000..1ec6f93243e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/__init__.pyi @@ -0,0 +1,212 @@ +# 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 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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(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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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[ + response_for_200.ApiResponse, + ]: ... + + @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[ + response_for_200.ApiResponse, + 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/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py new file mode 100644 index 00000000000..716aea63925 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py @@ -0,0 +1,69 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 BodySchemas: + # body schemas + + + class application_json( + 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, ], + ) -> 'application_json': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) 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/__init__.py similarity index 78% rename from samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py index 20ad57939b0..e6dc9ea12cf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py @@ -27,52 +27,29 @@ from petstore_api.model.order import Order -# body param -SchemaForRequestBodyApplicationJson = Order +from .. import path +from . import response_for_200 +from . import response_for_400 -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), - }, -) +class RequestBody: + class Schemas: + application_json = Order -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) +_status_code_to_response = { + '200': response_for_200.response, + '400': response_for_400.response, +} _all_accept_content_types = ( 'application/xml', 'application/json', @@ -83,34 +60,34 @@ class BaseApi(api_client.Api): @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -121,20 +98,20 @@ def _place_order_oapg( @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -160,7 +137,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -197,34 +174,34 @@ class PlaceOrder(BaseApi): @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -235,20 +212,20 @@ def place_order( @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -271,34 +248,34 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -309,20 +286,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, 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/__init__.pyi similarity index 77% rename from samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi index a92da10efbd..86a048365ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi @@ -27,58 +27,23 @@ from petstore_api.model.order import Order -from . import path +from . import response_for_200 +from . import response_for_400 -# 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), - }, -) - +class RequestBody: + class Schemas: + application_json = Order -@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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) _all_accept_content_types = ( 'application/xml', 'application/json', @@ -89,34 +54,34 @@ class BaseApi(api_client.Api): @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -127,20 +92,20 @@ def _place_order_oapg( @typing.overload def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _place_order_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -166,7 +131,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -203,34 +168,34 @@ class PlaceOrder(BaseApi): @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -241,20 +206,20 @@ def place_order( @typing.overload def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def place_order( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -277,34 +242,34 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -315,20 +280,20 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], 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, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200.py new file mode 100644 index 00000000000..8dcf32de5a1 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200.py @@ -0,0 +1,48 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_xml = Order + application_json = Order + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.py index 6eefe3953d1..7c3ec74dc38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.py @@ -24,63 +24,54 @@ 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 -) +from .. import path +from . import response_for_400 +from . import response_for_404 -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass +class RequestPathParameters: + class Schemas: + OrderIdSchema = schemas.StrSchema -request_path_order_id = api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=OrderIdSchema, - required=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'order_id': typing.Union[Schemas.OrderIdSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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, -) + parameters = [ + api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.OrderIdSchema, + required=True, + ), + ] +_status_code_to_response = { + '400': response_for_400.response, + '404': response_for_404.response, +} class BaseApi(api_client.Api): @typing.overload def _delete_order_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -89,7 +80,7 @@ def _delete_order_oapg( def _delete_order_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -97,7 +88,7 @@ def _delete_order_oapg( @typing.overload def _delete_order_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -107,7 +98,7 @@ def _delete_order_oapg( def _delete_order_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -118,13 +109,11 @@ def _delete_order_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_order_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -163,7 +152,7 @@ class DeleteOrder(BaseApi): @typing.overload def delete_order( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -172,7 +161,7 @@ def delete_order( def delete_order( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -180,7 +169,7 @@ def delete_order( @typing.overload def delete_order( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -190,7 +179,7 @@ def delete_order( def delete_order( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -209,7 +198,7 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -218,7 +207,7 @@ def delete( def delete( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -226,7 +215,7 @@ def delete( @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -236,7 +225,7 @@ def delete( def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 73% rename from samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.pyi index 2e2edd945d7..80e6688962e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.pyi @@ -24,69 +24,48 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_400 +from . import response_for_404 -# 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 +class RequestPathParameters: + class Schemas: + OrderIdSchema = schemas.StrSchema -request_path_order_id = api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=OrderIdSchema, - required=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'order_id': typing.Union[Schemas.OrderIdSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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, -} - + parameters = [ + api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.OrderIdSchema, + required=True, + ), + ] class BaseApi(api_client.Api): @typing.overload def _delete_order_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -95,7 +74,7 @@ def _delete_order_oapg( def _delete_order_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -103,7 +82,7 @@ def _delete_order_oapg( @typing.overload def _delete_order_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -113,7 +92,7 @@ def _delete_order_oapg( def _delete_order_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -124,13 +103,11 @@ def _delete_order_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_order_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -169,7 +146,7 @@ class DeleteOrder(BaseApi): @typing.overload def delete_order( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -178,7 +155,7 @@ def delete_order( def delete_order( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -186,7 +163,7 @@ def delete_order( @typing.overload def delete_order( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -196,7 +173,7 @@ def delete_order( def delete_order( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -215,7 +192,7 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -224,7 +201,7 @@ def delete( def delete( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -232,7 +209,7 @@ def delete( @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -242,7 +219,7 @@ def delete( def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 70% rename from samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.py index a4e2735912c..fd45ee5bfcc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.py @@ -25,86 +25,59 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.order import Order +from .. import path +from . import response_for_200 +from . import response_for_400 +from . import response_for_404 -# 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, +class RequestPathParameters: + class Schemas: + + + class OrderIdSchema( + schemas.Int64Schema + ): + + + class MetaOapg: + format = 'int64' + inclusive_maximum = 5 + inclusive_minimum = 1 + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'order_id': typing.Union[Schemas.OrderIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.OrderIdSchema, + required=True, + ), ] - 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.response, + '400': response_for_400.response, + '404': response_for_404.response, +} _all_accept_content_types = ( 'application/xml', 'application/json', @@ -115,20 +88,20 @@ class BaseApi(api_client.Api): @typing.overload def _get_order_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _get_order_by_id_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -137,19 +110,19 @@ def _get_order_by_id_oapg( @typing.overload def _get_order_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _get_order_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -161,13 +134,11 @@ def _get_order_by_id_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_order_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -212,20 +183,20 @@ class GetOrderById(BaseApi): @typing.overload def get_order_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get_order_by_id( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,19 +205,19 @@ def get_order_by_id( @typing.overload def get_order_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get_order_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -267,20 +238,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -289,19 +260,19 @@ def get( @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.pyi index 8c52441cf1e..e6e9c691e7f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.pyi @@ -25,99 +25,48 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.order import Order +from . import response_for_200 +from . import response_for_400 +from . import response_for_404 -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 = ( +class RequestPathParameters: + class Schemas: + + + class OrderIdSchema( + schemas.Int64Schema + ): + pass + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'order_id': typing.Union[Schemas.OrderIdSchema, decimal.Decimal, int, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.OrderIdSchema, + required=True, + ), + ]_all_accept_content_types = ( 'application/xml', 'application/json', ) @@ -127,20 +76,20 @@ class BaseApi(api_client.Api): @typing.overload def _get_order_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _get_order_by_id_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -149,19 +98,19 @@ def _get_order_by_id_oapg( @typing.overload def _get_order_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _get_order_by_id_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -173,13 +122,11 @@ def _get_order_by_id_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_order_id, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -224,20 +171,20 @@ class GetOrderById(BaseApi): @typing.overload def get_order_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get_order_by_id( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -246,19 +193,19 @@ def get_order_by_id( @typing.overload def get_order_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get_order_by_id( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,20 +226,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -301,19 +248,19 @@ def get( @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200.py new file mode 100644 index 00000000000..8dcf32de5a1 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200.py @@ -0,0 +1,48 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_xml = Order + application_json = Order + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 80% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py index 08cfcc902cd..dc607656849 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py @@ -27,33 +27,26 @@ from petstore_api.model.user import User -from . import path +from .. import path +from . import response_for_default -# body param -SchemaForRequestBodyApplicationJson = User -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = User + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + 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, + 'default': response_for_default.response, } @@ -61,32 +54,32 @@ class BaseApi(api_client.Api): @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -96,19 +89,19 @@ def _create_user_oapg( @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,7 +123,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -171,32 +164,32 @@ class CreateUser(BaseApi): @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -206,19 +199,19 @@ def create_user( @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -239,32 +232,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -274,19 +267,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 80% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi index df85a246c2c..0d0e9a2697f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi @@ -27,61 +27,54 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.user import User -# body param -SchemaForRequestBodyApplicationJson = User +from . import response_for_default -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) +class RequestBody: + class Schemas: + application_json = User -@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, -) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -91,19 +84,19 @@ class BaseApi(api_client.Api): @typing.overload def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _create_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -125,7 +118,7 @@ class BaseApi(api_client.Api): '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -166,32 +159,32 @@ class CreateUser(BaseApi): @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -201,19 +194,19 @@ class CreateUser(BaseApi): @typing.overload def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def create_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -234,32 +227,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -269,19 +262,19 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py index 6c83bb4f8b0..7d4708019ed 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py @@ -27,86 +27,84 @@ from petstore_api.model.user import User -# body param +from .. import path +from . import response_for_default -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - class MetaOapg: +class RequestBody: + class Schemas: - @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 + + class application_json( + 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, + ) -> 'application_json': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'User': + return super().__getitem__(i) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) +_status_code_to_response = { + 'default': response_for_default.response, +} class BaseApi(api_client.Api): @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -116,19 +114,19 @@ def _create_users_with_array_input_oapg( @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -150,7 +148,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -191,32 +189,32 @@ class CreateUsersWithArrayInput(BaseApi): @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -226,19 +224,19 @@ def create_users_with_array_input( @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -259,32 +257,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -294,19 +292,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi index d596822b475..dc46a6936c7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi @@ -27,91 +27,79 @@ from petstore_api.model.user import User -from . import path +from . import response_for_default -# body param -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: +class RequestBody: + class Schemas: - @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 - + + class application_json( + 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, + ) -> 'application_json': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'User': + return super().__getitem__(i) -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - 'default': _response_for_default, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -121,19 +109,19 @@ def _create_users_with_array_input_oapg( @typing.overload def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _create_users_with_array_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -155,7 +143,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -196,32 +184,32 @@ class CreateUsersWithArrayInput(BaseApi): @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -231,19 +219,19 @@ def create_users_with_array_input( @typing.overload def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def create_users_with_array_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -264,32 +252,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -299,19 +287,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py index ef9c94f6225..36bb233af20 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py @@ -27,86 +27,84 @@ from petstore_api.model.user import User -# body param +from .. import path +from . import response_for_default -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - class MetaOapg: +class RequestBody: + class Schemas: - @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 + + class application_json( + 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, + ) -> 'application_json': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'User': + return super().__getitem__(i) + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) +_status_code_to_response = { + 'default': response_for_default.response, +} class BaseApi(api_client.Api): @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -116,19 +114,19 @@ def _create_users_with_list_input_oapg( @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -150,7 +148,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -191,32 +189,32 @@ class CreateUsersWithListInput(BaseApi): @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -226,19 +224,19 @@ def create_users_with_list_input( @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -259,32 +257,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -294,19 +292,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 74% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi index fd0fe46f1b4..a6850fde31a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi @@ -27,91 +27,79 @@ from petstore_api.model.user import User -from . import path +from . import response_for_default -# body param -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: +class RequestBody: + class Schemas: - @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 - + + class application_json( + 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, + ) -> 'application_json': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'User': + return super().__getitem__(i) -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - 'default': _response_for_default, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -121,19 +109,19 @@ def _create_users_with_list_input_oapg( @typing.overload def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _create_users_with_list_input_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -155,7 +143,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -196,32 +184,32 @@ class CreateUsersWithListInput(BaseApi): @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -231,19 +219,19 @@ def create_users_with_list_input( @typing.overload def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def create_users_with_list_input( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -264,32 +252,32 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,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, + response_for_default.ApiResponse, ]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., stream: bool = False, @@ -299,19 +287,19 @@ def post( @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = ..., stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + body: typing.Union[RequestBody.Schemas.application_json,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.py index 3fb920a0c0e..449d66962ae 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.py @@ -25,90 +25,57 @@ 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, +from .. import path +from . import response_for_200 +from . import response_for_400 + + + +class RequestQueryParameters: + class Schemas: + UsernameSchema = schemas.StrSchema + PasswordSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'password': typing.Union[Schemas.PasswordSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="username", + style=api_client.ParameterStyle.FORM, + schema=Schemas.UsernameSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="password", + style=api_client.ParameterStyle.FORM, + schema=Schemas.PasswordSchema, + required=True, + explode=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, -) +_status_code_to_response = { + '200': response_for_200.response, + '400': response_for_400.response, +} _all_accept_content_types = ( 'application/xml', 'application/json', @@ -119,20 +86,20 @@ class BaseApi(api_client.Api): @typing.overload def _login_user_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _login_user_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -141,19 +108,19 @@ def _login_user_oapg( @typing.overload def _login_user_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _login_user_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -165,14 +132,11 @@ def _login_user_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_username, - request_query_password, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -217,20 +181,20 @@ class LoginUser(BaseApi): @typing.overload def login_user( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def login_user( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -239,19 +203,19 @@ def login_user( @typing.overload def login_user( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def login_user( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -272,20 +236,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,19 +258,19 @@ def get( @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 65% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.pyi index 0d963a9eb28..34fd0255e02 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.pyi @@ -25,107 +25,52 @@ 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 = ( +from . import response_for_200 +from . import response_for_400 + + + +class RequestQueryParameters: + class Schemas: + UsernameSchema = schemas.StrSchema + PasswordSchema = schemas.StrSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'password': typing.Union[Schemas.PasswordSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.QueryParameter( + name="username", + style=api_client.ParameterStyle.FORM, + schema=Schemas.UsernameSchema, + required=True, + explode=True, + ), + api_client.QueryParameter( + name="password", + style=api_client.ParameterStyle.FORM, + schema=Schemas.PasswordSchema, + required=True, + explode=True, + ), + ]_all_accept_content_types = ( 'application/xml', 'application/json', ) @@ -135,20 +80,20 @@ class BaseApi(api_client.Api): @typing.overload def _login_user_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _login_user_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,19 +102,19 @@ def _login_user_oapg( @typing.overload def _login_user_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _login_user_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -181,14 +126,11 @@ def _login_user_oapg( 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(RequestQueryParameters.Params, query_params) used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_username, - request_query_password, - ): + for parameter in RequestQueryParameters.parameters: parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -233,20 +175,20 @@ class LoginUser(BaseApi): @typing.overload def login_user( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def login_user( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -255,19 +197,19 @@ def login_user( @typing.overload def login_user( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def login_user( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,20 +230,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -310,19 +252,19 @@ def get( @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), + query_params: RequestQueryParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py new file mode 100644 index 00000000000..87460fe0b5b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py @@ -0,0 +1,85 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 Header: + class Schemas: + XRateLimitSchema = schemas.Int32Schema + XExpiresAfterSchema = schemas.DateTimeSchema + + + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'X-Rate-Limit': typing.Union[Schemas.XRateLimitSchema, decimal.Decimal, int, ], + 'X-Expires-After': typing.Union[Schemas.XExpiresAfterSchema, str, datetime, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + api_client.HeaderParameter( + name="X-Rate-Limit", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.XRateLimitSchema, + ), + api_client.HeaderParameter( + name="X-Expires-After", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.XExpiresAfterSchema, + ), + ] + +class BodySchemas: + # body schemas + application_xml = schemas.StrSchema + application_json = schemas.StrSchema + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: Header.Params + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, + headers=Header.parameters +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 92% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/__init__.py index 302df64884f..c3871dd3ee7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/__init__.py @@ -24,18 +24,13 @@ from petstore_api import schemas # noqa: F401 +from .. import path +from . import response_for_default -@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.response, +} class BaseApi(api_client.Api): @@ -46,7 +41,7 @@ def _logout_user_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload @@ -64,7 +59,7 @@ def _logout_user_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -119,7 +114,7 @@ def logout_user( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload @@ -137,7 +132,7 @@ def logout_user( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -164,7 +159,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload @@ -182,7 +177,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... 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/__init__.pyi similarity index 91% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/__init__.pyi index 0814ac97f9f..00868ebe200 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/__init__.pyi @@ -24,25 +24,10 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_default -@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( @@ -51,7 +36,7 @@ def _logout_user_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload @@ -69,7 +54,7 @@ def _logout_user_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -124,7 +109,7 @@ def logout_user( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload @@ -142,7 +127,7 @@ def logout_user( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... @@ -169,7 +154,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, ]: ... @typing.overload @@ -187,7 +172,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseForDefault, + response_for_default.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 72% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.py index 3240953717f..039b88deac0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.py @@ -24,75 +24,66 @@ 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 -) +from .. import path +from . import response_for_200 +from . import response_for_404 -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass +class RequestPathParameters: + class Schemas: + UsernameSchema = schemas.StrSchema -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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, -) + parameters = [ + api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.UsernameSchema, + required=True, + ), + ] +_status_code_to_response = { + '200': response_for_200.response, + '404': response_for_404.response, +} class BaseApi(api_client.Api): @typing.overload def _delete_user_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _delete_user_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -100,18 +91,18 @@ def _delete_user_oapg( @typing.overload def _delete_user_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _delete_user_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -122,13 +113,11 @@ def _delete_user_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_username, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -167,19 +156,19 @@ class DeleteUser(BaseApi): @typing.overload def delete_user( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def delete_user( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -187,18 +176,18 @@ def delete_user( @typing.overload def delete_user( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete_user( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -217,19 +206,19 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def delete( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -237,18 +226,18 @@ def delete( @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.pyi index 769252ca8da..ab944a44bcb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.pyi @@ -24,81 +24,60 @@ from petstore_api import schemas # noqa: F401 -from . import path +from . import response_for_200 +from . import response_for_404 -# 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 +class RequestPathParameters: + class Schemas: + UsernameSchema = schemas.StrSchema -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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, -} - + parameters = [ + api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.UsernameSchema, + required=True, + ), + ] class BaseApi(api_client.Api): @typing.overload def _delete_user_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _delete_user_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -106,18 +85,18 @@ def _delete_user_oapg( @typing.overload def _delete_user_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _delete_user_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -128,13 +107,11 @@ def _delete_user_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_username, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -173,19 +150,19 @@ class DeleteUser(BaseApi): @typing.overload def delete_user( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def delete_user( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -193,18 +170,18 @@ def delete_user( @typing.overload def delete_user( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete_user( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -223,19 +200,19 @@ class ApiFordelete(BaseApi): @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def delete( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -243,18 +220,18 @@ def delete( @typing.overload def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def delete( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.py index 63e188e6ce6..ffd9d78d37b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.py @@ -25,81 +25,49 @@ 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 +from .. import path +from . import response_for_200 +from . import response_for_400 +from . import response_for_404 -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 +class RequestPathParameters: + class Schemas: + UsernameSchema = schemas.StrSchema -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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, -) + parameters = [ + api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.UsernameSchema, + required=True, + ), + ] +_status_code_to_response = { + '200': response_for_200.response, + '400': response_for_400.response, + '404': response_for_404.response, +} _all_accept_content_types = ( 'application/xml', 'application/json', @@ -110,20 +78,20 @@ class BaseApi(api_client.Api): @typing.overload def _get_user_by_name_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _get_user_by_name_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -132,19 +100,19 @@ def _get_user_by_name_oapg( @typing.overload def _get_user_by_name_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _get_user_by_name_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -156,13 +124,11 @@ def _get_user_by_name_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_username, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -207,20 +173,20 @@ class GetUserByName(BaseApi): @typing.overload def get_user_by_name( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get_user_by_name( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -229,19 +195,19 @@ def get_user_by_name( @typing.overload def get_user_by_name( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get_user_by_name( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -262,20 +228,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -284,19 +250,19 @@ def get( @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, 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/__init__.pyi similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.pyi index 9ee437ce793..2a2dcf71462 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.pyi @@ -25,89 +25,43 @@ from petstore_api import schemas # noqa: F401 -from petstore_api.model.user import User +from . import response_for_200 +from . import response_for_400 +from . import response_for_404 -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 +class RequestPathParameters: + class Schemas: + UsernameSchema = schemas.StrSchema -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), - }, -) + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + class Params(RequiredParams, OptionalParams): + pass -_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 = ( + parameters = [ + api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.UsernameSchema, + required=True, + ), + ]_all_accept_content_types = ( 'application/xml', 'application/json', ) @@ -117,20 +71,20 @@ class BaseApi(api_client.Api): @typing.overload def _get_user_by_name_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def _get_user_by_name_oapg( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -139,19 +93,19 @@ def _get_user_by_name_oapg( @typing.overload def _get_user_by_name_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def _get_user_by_name_oapg( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -163,13 +117,11 @@ def _get_user_by_name_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_username, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -214,20 +166,20 @@ class GetUserByName(BaseApi): @typing.overload def get_user_by_name( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get_user_by_name( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -236,19 +188,19 @@ def get_user_by_name( @typing.overload def get_user_by_name( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get_user_by_name( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -269,20 +221,20 @@ class ApiForget(BaseApi): @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, ]: ... @typing.overload def get( self, skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -291,19 +243,19 @@ def get( @typing.overload def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., ) -> typing.Union[ - ApiResponseFor200, + response_for_200.ApiResponse, api_client.ApiResponseWithoutDeserialization, ]: ... def get( self, - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200.py new file mode 100644 index 00000000000..dfa7a123c31 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200.py @@ -0,0 +1,48 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +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 + + +class BodySchemas: + # body schemas + application_xml = User + application_json = User + pass + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + BodySchemas.application_xml, + BodySchemas.application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/xml': api_client.MediaType( + schema=BodySchemas.application_xml, + ), + 'application/json': api_client.MediaType( + schema=BodySchemas.application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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/__init__.py similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.py index 864e5bfac32..0c52820ac8e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.py @@ -27,76 +27,70 @@ 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 -) +from .. import path +from . import response_for_400 +from . import response_for_404 -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass +class RequestPathParameters: + class Schemas: + UsernameSchema = schemas.StrSchema -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = User + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) + class Params(RequiredParams, OptionalParams): + pass -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameters = [ + api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.UsernameSchema, + required=True, + ), + ] -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) +class RequestBody: + class Schemas: + application_json = User + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) -@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.response, + '404': response_for_404.response, +} class BaseApi(api_client.Api): @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -104,9 +98,9 @@ def _update_user_oapg( @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -115,10 +109,10 @@ def _update_user_oapg( @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -126,9 +120,9 @@ def _update_user_oapg( @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -138,9 +132,9 @@ def _update_user_oapg( def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -151,13 +145,11 @@ def _update_user_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_username, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -175,7 +167,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -212,9 +204,9 @@ class UpdateUser(BaseApi): @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -222,9 +214,9 @@ def update_user( @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -233,10 +225,10 @@ def update_user( @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -244,9 +236,9 @@ def update_user( @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -256,9 +248,9 @@ def update_user( def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -279,9 +271,9 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -289,9 +281,9 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -300,10 +292,10 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -311,9 +303,9 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -323,9 +315,9 @@ def put( def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, 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/__init__.pyi similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.pyi index 5a5445aff92..9a8d4c152ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.pyi @@ -27,82 +27,64 @@ from petstore_api.model.user import User -from . import path +from . import response_for_400 +from . import response_for_404 -# 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 +class RequestPathParameters: + class Schemas: + UsernameSchema = schemas.StrSchema -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = User + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + 'username': typing.Union[Schemas.UsernameSchema, str, ], + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + }, + total=False + ) -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) + class Params(RequiredParams, OptionalParams): + pass -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset + parameters = [ + api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=Schemas.UsernameSchema, + required=True, + ), + ] +class RequestBody: + class Schemas: + application_json = User -_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, -} + parameter = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=Schemas.application_json + ), + }, + required=True, + ) class BaseApi(api_client.Api): @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -110,9 +92,9 @@ def _update_user_oapg( @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -121,10 +103,10 @@ def _update_user_oapg( @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -132,9 +114,9 @@ def _update_user_oapg( @typing.overload def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -144,9 +126,9 @@ def _update_user_oapg( def _update_user_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -157,13 +139,11 @@ def _update_user_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + self._verify_typed_dict_inputs_oapg(RequestPathParameters.Params, path_params) used_path = path.value _path_params = {} - for parameter in ( - request_path_username, - ): + for parameter in RequestPathParameters.parameters: parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -181,7 +161,7 @@ class instances '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) + serialized_data = RequestBody.parameter.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] @@ -218,9 +198,9 @@ class UpdateUser(BaseApi): @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -228,9 +208,9 @@ def update_user( @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -239,10 +219,10 @@ def update_user( @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -250,9 +230,9 @@ def update_user( @typing.overload def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -262,9 +242,9 @@ def update_user( def update_user( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -285,9 +265,9 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -295,9 +275,9 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -306,10 +286,10 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -317,9 +297,9 @@ def put( @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -329,9 +309,9 @@ def put( def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[RequestBody.Schemas.application_json,], content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), + path_params: RequestPathParameters.Params = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404.py @@ -0,0 +1,28 @@ +import dataclasses +import urllib3 + +from petstore_api import api_client +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, +) 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 index 827d02aaf11..9d8f03f742e 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = patch.response_for_200.BodySchemas.application_json 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 index e8d79727a09..870b0e17c51 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = patch.response_for_200.BodySchemas.application_json 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 index 7a2c11bd646..cfa08db5ba6 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index 51c483bdc08..9985e3de124 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = patch.response_for_200.BodySchemas.application_json 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 index dd6f2a54850..99336b22e73 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index fe16f7a4581..ce9d45bba39 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.BodySchemas.multipart_form_data 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 index 26105cad9f0..101b935d203 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json_charsetutf_8 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 index 8bf351c3dc3..421890070ea 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index 23bc55d273b..6e5b607aaec 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index fe890aad78d..ac6f0142d0a 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index 28aedd8c2c0..ba0c6ca06f4 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index a252701f4ee..b86f2da8886 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index 3ac8fd5b4ae..bb2bd3ee472 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index d5963d8503a..78cec3a281c 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index fde250a49eb..63198567f3b 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index a692191f471..79df7b7f36d 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index b398b419ba9..4c9ca88b9d1 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index f6c51016d9e..b39ea9f1ddd 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index b7eaa838420..dc312d0ce1f 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index 5c044094664..ca075f4fbec 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_octet_stream 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 index d877e592ac0..dbcfc80ffb0 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index b0123d36aea..2eb74b061bc 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index 809b636d6c3..b45082bfdd2 100644 --- 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 @@ -32,6 +32,7 @@ def tearDown(self): pass response_status = 0 + response_body_schema = get.response_for_default.BodySchemas.application_json 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 index 2251f64e1b5..693f01478d8 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_xml + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index 48671bad4f4..df62362e2f1 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_xml + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index 78e02c339c2..6b7f77ef1b1 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_xml + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index b25f4ef89b2..9835c581cd1 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index e1363824ef8..ee0de2495a3 100644 --- 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 @@ -33,6 +33,7 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index 69adb4340e5..be6b3bc52f8 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = post.response_for_200.BodySchemas.application_xml + response_body_schema = post.response_for_200.BodySchemas.application_json 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 index 55a5443d970..47cb31c45d6 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_xml + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index ad71bc1d4f3..dcf02006251 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_xml + response_body_schema = get.response_for_200.BodySchemas.application_json 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 index c56b8bd1e4d..60ab583262e 100644 --- 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 @@ -33,8 +33,10 @@ def tearDown(self): pass response_status = 200 + response_body_schema = get.response_for_200.BodySchemas.application_xml + response_body_schema = get.response_for_200.BodySchemas.application_json diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py index 7c0300fbcd1..ab89bfcd4f6 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py @@ -357,32 +357,32 @@ def test_deserialize_with_additional_properties_and_reference(self): 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 + 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) + response_for_200.response.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) + response_for_200.response.deserialize(response, self.configuration) # valid value works number_val = 11.0 response = self.__response(number_val) - response = _response_for_200.deserialize(response, self.configuration) + response = response_for_200.response.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.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) + deserialized = response_for_200.response.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 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 index 42fc674cd2d..f6dde99f670 100644 --- 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 @@ -36,9 +36,9 @@ def testObjectModelWithRefProps(self): assert inst["myNumber"] == 15.0 assert isinstance(inst["myNumber"], NumberWithValidations) assert inst["myString"] == 'a' - assert isinstance(inst["myString"], ObjectModelWithRefProps.MetaOapg.properties.myString) + 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"], ObjectModelWithRefProps.MetaOapg.properties.myBoolean()) assert isinstance(inst["myBoolean"], BoolClass) From 96c09212466dbb986863e02543f8d4da80549e76 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 12 Oct 2022 12:40:07 -0700 Subject: [PATCH 2/7] Endpoint docs improved, not done yet --- .../languages/PythonClientCodegen.java | 12 - .../main/resources/python/api_doc.handlebars | 49 +- ...pi_doc_schema_fancy_schema_name.handlebars | 1 + .../api_doc_schema_type_hint.handlebars | 2 +- .../python/.openapi-generator/VERSION | 2 +- .../python/docs/apis/tags/AnotherFakeApi.md | 15 +- .../python/docs/apis/tags/DefaultApi.md | 10 +- .../petstore/python/docs/apis/tags/FakeApi.md | 681 ++++++++---------- .../docs/apis/tags/FakeClassnameTags123Api.md | 15 +- .../petstore/python/docs/apis/tags/PetApi.md | 201 +++--- .../python/docs/apis/tags/StoreApi.md | 74 +- .../petstore/python/docs/apis/tags/UserApi.md | 142 ++-- .../paths/fake/delete/__init__.py | 36 +- .../paths/fake/delete/__init__.pyi | 36 +- .../petstore_api/paths/fake/get/__init__.py | 40 +- .../petstore_api/paths/fake/get/__init__.pyi | 40 +- .../put/__init__.py | 6 +- .../put/__init__.pyi | 6 +- .../put/__init__.py | 18 +- .../put/__init__.pyi | 18 +- .../fake_delete_coffee_id/delete/__init__.py | 6 +- .../fake_delete_coffee_id/delete/__init__.pyi | 6 +- .../fake_inline_composition_/post/__init__.py | 16 +- .../post/__init__.pyi | 16 +- .../paths/fake_obj_in_query/get/__init__.py | 8 +- .../paths/fake_obj_in_query/get/__init__.pyi | 8 +- .../post/__init__.py | 114 +-- .../post/__init__.pyi | 114 +-- .../post/__init__.py | 6 +- .../post/__init__.pyi | 6 +- .../fake_ref_obj_in_query/get/__init__.py | 6 +- .../fake_ref_obj_in_query/get/__init__.pyi | 6 +- .../fake_test_query_paramters/put/__init__.py | 46 +- .../put/__init__.pyi | 46 +- .../paths/pet_find_by_status/get/__init__.py | 8 +- .../paths/pet_find_by_status/get/__init__.pyi | 8 +- .../paths/pet_find_by_tags/get/__init__.py | 8 +- .../paths/pet_find_by_tags/get/__init__.pyi | 8 +- .../paths/pet_pet_id/delete/__init__.py | 12 +- .../paths/pet_pet_id/delete/__init__.pyi | 12 +- .../paths/pet_pet_id/get/__init__.py | 6 +- .../paths/pet_pet_id/get/__init__.pyi | 6 +- .../paths/pet_pet_id/post/__init__.py | 6 +- .../paths/pet_pet_id/post/__init__.pyi | 6 +- .../pet_pet_id_upload_image/post/__init__.py | 6 +- .../pet_pet_id_upload_image/post/__init__.pyi | 6 +- .../store_order_order_id/delete/__init__.py | 6 +- .../store_order_order_id/delete/__init__.pyi | 6 +- .../store_order_order_id/get/__init__.py | 6 +- .../store_order_order_id/get/__init__.pyi | 6 +- .../paths/user_login/get/__init__.py | 12 +- .../paths/user_login/get/__init__.pyi | 12 +- .../paths/user_login/get/response_for_200.py | 12 +- .../paths/user_username/delete/__init__.py | 6 +- .../paths/user_username/delete/__init__.pyi | 6 +- .../paths/user_username/get/__init__.py | 6 +- .../paths/user_username/get/__init__.pyi | 6 +- .../paths/user_username/put/__init__.py | 6 +- .../paths/user_username/put/__init__.pyi | 6 +- 59 files changed, 959 insertions(+), 1037 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_fancy_schema_name.handlebars diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 4a85fb38e7b..2f0fb16375c 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -954,18 +954,6 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) 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; } diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars index 1c279b5a374..12196bf9100 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars @@ -13,11 +13,14 @@ Method | HTTP request | Description {{#each operation}} # **{{{operationId}}}** -> {{#if returnType}}{{{returnType}}} {{/if}}{{{operationId}}}({{#each requiredParams}}{{#unless defaultValue}}{{paramName}}{{#if hasMore}}, {{/if}}{{/unless}}{{/each}}) -{{#if summary}}{{{summary}}}{{/if}}{{#if notes}} +{{#if summary}} +{{{summary}}} +{{/if}} +{{#if notes}} -{{{notes}}}{{/if}} +{{{notes}}} +{{/if}} ### Example @@ -46,19 +49,19 @@ Method | HTTP request | Description Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#with bodyParam}} -{{baseName}} | typing.Union[{{#each content}}{{#unless @first}}, {{/unless}}{{this.schema.baseName}}{{/each}}{{#unless required}}, Unset]{{else}}]{{/unless}} | {{#if required}}required{{else}}optional, default is unset{{/if}} | +[{{baseName}}](#{{operationId}}.RequestBody) | typing.Union[{{#each content}}{{#unless @first}}, {{/unless}}{{#with this.schema}}[RequestBody.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../operationId}}.RequestBody.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}}{{/each}}{{#unless required}}, Unset]{{else}}]{{/unless}} | {{#if required}}required{{else}}optional, default is unset{{/if}} | {{/with}} {{#if queryParams}} -query_params | RequestQueryParams | | +[query_params](#{{operationId}}.RequestQueryParameters) | [RequestQueryParameters.Params](#{{operationId}}.RequestQueryParameters.Params) | | {{/if}} {{#if headerParams}} -header_params | RequestHeaderParams | | +header_params | RequestHeaderParameters.Params | | {{/if}} {{#if pathParams}} -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | {{/if}} {{#if cookieParams}} -cookie_params | RequestCookieParams | | +cookie_params | RequestCookieParameters.Params | | {{/if}} {{#with bodyParam}} {{#each content}} @@ -78,34 +81,34 @@ timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | t skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned {{#with bodyParam}} -### body +### body {{#each content}} {{#with this.schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../operationId schemaNamePrefix1="RequestBody.Schemas." complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/with}} {{#if queryParams}} -### query_params -#### RequestQueryParams +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each queryParams}} -{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} +{{baseName}} | {{#with schema}}[RequestQueryParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestQueryParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} {{/each}} {{#each queryParams}} {{#with schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestQueryParameters.Schemas." complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} {{#if headerParams}} ### header_params -#### RequestHeaderParams +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -121,7 +124,7 @@ Name | Type | Description | Notes {{#if pathParams}} ### path_params -#### RequestPathParams +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -137,7 +140,7 @@ Name | Type | Description | Notes {{#if cookieParams}} ### cookie_params -#### RequestCookieParams +#### RequestCookieParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -161,27 +164,27 @@ Code | Class | Description n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned {{#each responses}} {{#if isDefault}} -default | [ApiResponseForDefault](#{{operationId}}.ApiResponseForDefault) | {{message}} +default | [response_for_default.ApiResponse](#{{operationId}}.response_for_default.ApiResponse) | {{message}} {{else}} -{{code}} | [ApiResponseFor{{code}}](#{{operationId}}.ApiResponseFor{{code}}) | {{message}} +{{code}} | [response_for_{{code}}.ApiResponse](#{{operationId}}.response_for_{{code}}.ApiResponse) | {{message}} {{/if}} {{/each}} {{#each responses}} {{#if isDefault}} -#### {{operationId}}.ApiResponseForDefault +#### response_for_default.ApiResponse {{else}} -#### {{operationId}}.ApiResponseFor{{code}} +#### response_for_{{code}}.ApiResponse {{/if}} Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | {{#unless content}}Unset{{else}}typing.Union[{{#each content}}{{#if this.schema}}{{this.schema.baseName}}{{else}}Unset{{/if}}, {{/each}}]{{/unless}} | {{#unless content}}body was not defined{{/unless}} | +body | {{#unless content}}Unset{{else}}typing.Union[{{#each content}}{{#if this.schema}}[response_for_{{code}}.BodySchemas.{{#if this.schema.nameInSnakeCase}}{{this.schema.name}}{{else}}{{this.schema.baseName}}{{/if}}](#{{operationId}}.response_for_{{code}}.BodySchemas.{{#if this.schema.nameInSnakeCase}}{{this.schema.name}}{{else}}{{this.schema.baseName}}{{/if}}){{else}}Unset{{/if}}, {{/each}}]{{/unless}} | {{#unless content}}body was not defined{{/unless}} | headers | {{#unless responseHeaders}}Unset{{else}}ResponseHeadersFor{{code}}{{/unless}} | {{#unless responseHeaders}}headers were not defined{{/unless}} | {{#each content}} {{#with this.schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="response_for_" schemaNamePrefix2=../../code schemaNamePrefix3=".BodySchemas." complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{#if responseHeaders}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_fancy_schema_name.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_fancy_schema_name.handlebars new file mode 100644 index 00000000000..e3fc10e3e84 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_fancy_schema_name.handlebars @@ -0,0 +1 @@ +{{schemaNamePrefix1}}{{#if schemaNamePrefix2}}{{schemaNamePrefix2}}{{/if}}{{#if schemaNamePrefix3}}{{schemaNamePrefix3}}{{/if}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_type_hint.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_type_hint.handlebars index 27aa7a499b7..5828b601de7 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_type_hint.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc_schema_type_hint.handlebars @@ -1,5 +1,5 @@ -# {{baseName}} +# {{#if schemaNamePrefix1}}{{#if anchorPrefix}}{{/if}}{{> api_doc_schema_fancy_schema_name }}{{#if anchorPrefix}}{{/if}}{{else}}{{baseName}}{{/if}} {{#if complexType}} Type | Description | Notes ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 359a5b952d4..717311e32e3 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +unset \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md index 111e3aa98a4..9e3e1779229 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md @@ -9,7 +9,6 @@ Method | HTTP request | Description # **call_123_test_special_tags** -> Client call_123_test_special_tags(client) To test special tags @@ -50,16 +49,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#call_123_test_special_tags.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#call_123_test_special_tags.RequestBody.Schemas.application_json)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -70,16 +69,16 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#call_123_test_special_tags.response_for_200.ApiResponse) | successful operation -#### call_123_test_special_tags.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#call_123_test_special_tags.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.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 index c569948e285..b5429ec3839 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md @@ -9,8 +9,6 @@ Method | HTTP request | Description # **foo_get** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} foo_get() - ### Example @@ -45,16 +43,16 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#foo_get.ApiResponseForDefault) | response +default | [response_for_default.ApiResponse](#foo_get.response_for_default.ApiResponse) | response -#### foo_get.ApiResponseForDefault +#### response_for_default.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_0.BodySchemas.application_json](#foo_get.response_for_0.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_0.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index c9ef74cb3b8..28903497797 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -41,7 +41,6 @@ Method | HTTP request | Description # **additional_properties_with_array_of_enums** -> AdditionalPropertiesWithArrayOfEnums additional_properties_with_array_of_enums() Additional Properties with Array of Enums @@ -82,16 +81,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#additional_properties_with_array_of_enums.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#additional_properties_with_array_of_enums.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -102,16 +101,16 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#additional_properties_with_array_of_enums.response_for_200.ApiResponse) | Got object with additional properties with array of enums -#### additional_properties_with_array_of_enums.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#additional_properties_with_array_of_enums.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -125,8 +124,6 @@ No authorization required # **array_model** -> AnimalFarm array_model() - Test serialization of ArrayModel @@ -165,16 +162,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#array_model.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#array_model.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -185,16 +182,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#array_model.ApiResponseFor200) | Output model +200 | [response_for_200.ApiResponse](#array_model.response_for_200.ApiResponse) | Output model -#### array_model.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#array_model.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -208,7 +205,6 @@ No authorization required # **array_of_enums** -> ArrayOfEnums array_of_enums() Array of Enums @@ -247,16 +243,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#array_of_enums.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#array_of_enums.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -267,16 +263,16 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#array_of_enums.response_for_200.ApiResponse) | Got named array of enums -#### array_of_enums.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#array_of_enums.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -290,8 +286,6 @@ No authorization required # **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`. @@ -334,15 +328,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#body_with_file_schema.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#body_with_file_schema.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**FileSchemaTestClass**](../../models/FileSchemaTestClass.md) | | @@ -353,9 +347,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#body_with_file_schema.response_for_200.ApiResponse) | Success -#### body_with_file_schema.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -370,8 +364,6 @@ No authorization required # **body_with_query_params** -> body_with_query_params(queryuser) - ### Example @@ -423,30 +415,30 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | -query_params | RequestQueryParams | | +[body](#body_with_query_params.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#body_with_query_params.RequestBody.Schemas.application_json)] | required | +[query_params](#body_with_query_params.RequestQueryParameters) | [RequestQueryParameters.Params](#body_with_query_params.RequestQueryParameters.Params) | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | -### query_params -#### RequestQueryParams +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query | QuerySchema | | +query | [RequestQueryParameters.Schemas.query](#body_with_query_params.RequestQueryParameters.Schemas.query) | | -# QuerySchema +# RequestQueryParameters.Schemas.query ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -458,9 +450,9 @@ str, | str, | | 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 +200 | [response_for_200.ApiResponse](#body_with_query_params.response_for_200.ApiResponse) | Success -#### body_with_query_params.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -475,8 +467,6 @@ No authorization required # **boolean** -> Boolean boolean() - Test serialization of outer boolean types @@ -513,16 +503,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#boolean.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#boolean.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Boolean**](../../models/Boolean.md) | | @@ -533,16 +523,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#boolean.ApiResponseFor200) | Output boolean +200 | [response_for_200.ApiResponse](#boolean.response_for_200.ApiResponse) | Output boolean -#### boolean.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#boolean.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Boolean**](../../models/Boolean.md) | | @@ -556,8 +546,6 @@ No authorization required # **case_sensitive_params** -> case_sensitive_params(some_varsome_var2some_var3) - Ensures that original naming is used in endpoint params, that way we on't have collisions @@ -596,36 +584,36 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#case_sensitive_params.RequestQueryParameters) | [RequestQueryParameters.Params](#case_sensitive_params.RequestQueryParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -someVar | SomeVarSchema | | -SomeVar | SomeVarSchema | | -some_var | SomeVarSchema | | +someVar | [RequestQueryParameters.Schemas.someVar](#case_sensitive_params.RequestQueryParameters.Schemas.someVar) | | +SomeVar | [RequestQueryParameters.Schemas.SomeVar](#case_sensitive_params.RequestQueryParameters.Schemas.SomeVar) | | +some_var | [RequestQueryParameters.Schemas.some_var](#case_sensitive_params.RequestQueryParameters.Schemas.some_var) | | -# SomeVarSchema +# RequestQueryParameters.Schemas.someVar ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# SomeVarSchema +# RequestQueryParameters.Schemas.SomeVar ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# SomeVarSchema +# RequestQueryParameters.Schemas.some_var ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -637,9 +625,9 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#case_sensitive_params.ApiResponseFor200) | Success +200 | [response_for_200.ApiResponse](#case_sensitive_params.response_for_200.ApiResponse) | Success -#### case_sensitive_params.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -654,7 +642,6 @@ No authorization required # **client_model** -> Client client_model(client) To test \"client\" model @@ -695,16 +682,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#client_model.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#client_model.RequestBody.Schemas.application_json)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -715,16 +702,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#client_model.ApiResponseFor200) | successful operation +200 | [response_for_200.ApiResponse](#client_model.response_for_200.ApiResponse) | successful operation -#### client_model.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#client_model.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -738,8 +725,6 @@ No authorization required # **composed_one_of_different_types** -> ComposedOneOfDifferentTypes composed_one_of_different_types() - Test serialization of object with $refed properties @@ -776,16 +761,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#composed_one_of_different_types.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#composed_one_of_different_types.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -796,16 +781,16 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#composed_one_of_different_types.response_for_200.ApiResponse) | Output model -#### composed_one_of_different_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#composed_one_of_different_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -819,7 +804,6 @@ No authorization required # **delete_coffee** -> delete_coffee(id) Delete coffee @@ -858,19 +842,19 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -id | IdSchema | | +id | id | | -# IdSchema +# id ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -882,17 +866,17 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_coffee.ApiResponseFor200) | OK -default | [ApiResponseForDefault](#delete_coffee.ApiResponseForDefault) | Unexpected error +200 | [response_for_200.ApiResponse](#delete_coffee.response_for_200.ApiResponse) | OK +default | [response_for_default.ApiResponse](#delete_coffee.response_for_default.ApiResponse) | Unexpected error -#### delete_coffee.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### delete_coffee.ApiResponseForDefault +#### response_for_default.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -907,7 +891,6 @@ No authorization required # **endpoint_parameters** -> endpoint_parameters() Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -970,15 +953,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/x-www-form-urlencoded, Unset] | optional, default is unset | +[body](#endpoint_parameters.RequestBody) | typing.Union[[RequestBody.Schemas.application_x_www_form_urlencoded](#endpoint_parameters.RequestBody.Schemas.application_x_www_form_urlencoded), 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 +### body -# application/x-www-form-urlencoded +# RequestBody.Schemas.application_x_www_form_urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1009,17 +992,17 @@ Key | Input Type | Accessed Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#endpoint_parameters.response_for_200.ApiResponse) | Success +404 | [response_for_404.ApiResponse](#endpoint_parameters.response_for_404.ApiResponse) | User not found -#### endpoint_parameters.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### endpoint_parameters.ApiResponseFor404 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1034,7 +1017,6 @@ headers | Unset | headers were not defined | # **enum_parameters** -> enum_parameters() To test enum parameters @@ -1092,17 +1074,17 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/x-www-form-urlencoded, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | +[body](#enum_parameters.RequestBody) | typing.Union[[RequestBody.Schemas.application_x_www_form_urlencoded](#enum_parameters.RequestBody.Schemas.application_x_www_form_urlencoded), Unset] | optional, default is unset | +[query_params](#enum_parameters.RequestQueryParameters) | [RequestQueryParameters.Params](#enum_parameters.RequestQueryParameters.Params) | | +header_params | RequestHeaderParameters.Params | | 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 +### body -# application/x-www-form-urlencoded +# RequestBody.Schemas.application_x_www_form_urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1130,18 +1112,18 @@ 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 +### query_params +#### RequestQueryParameters.Params 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 +enum_query_string_array | [RequestQueryParameters.Schemas.enum_query_string_array](#enum_parameters.RequestQueryParameters.Schemas.enum_query_string_array) | | optional +enum_query_string | [RequestQueryParameters.Schemas.enum_query_string](#enum_parameters.RequestQueryParameters.Schemas.enum_query_string) | | optional +enum_query_integer | [RequestQueryParameters.Schemas.enum_query_integer](#enum_parameters.RequestQueryParameters.Schemas.enum_query_integer) | | optional +enum_query_double | [RequestQueryParameters.Schemas.enum_query_double](#enum_parameters.RequestQueryParameters.Schemas.enum_query_double) | | optional -# EnumQueryStringArraySchema +# RequestQueryParameters.Schemas.enum_query_string_array ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1153,21 +1135,21 @@ 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 +# RequestQueryParameters.Schemas.enum_query_string ## 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 +# RequestQueryParameters.Schemas.enum_query_integer ## 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 +# RequestQueryParameters.Schemas.enum_query_double ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1175,14 +1157,14 @@ 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 +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -enum_header_string_array | EnumHeaderStringArraySchema | | optional -enum_header_string | EnumHeaderStringSchema | | optional +enum_header_string_array | enum_header_string_array | | optional +enum_header_string | enum_header_string | | optional -# EnumHeaderStringArraySchema +# enum_header_string_array ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1194,7 +1176,7 @@ 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 +# enum_header_string ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1206,17 +1188,17 @@ str, | str, | | must be one of ["_abc", "-efg", "(xyz)", ] if omitted the ser Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#enum_parameters.ApiResponseFor200) | Success -404 | [ApiResponseFor404](#enum_parameters.ApiResponseFor404) | Not found +200 | [response_for_200.ApiResponse](#enum_parameters.response_for_200.ApiResponse) | Success +404 | [response_for_404.ApiResponse](#enum_parameters.response_for_404.ApiResponse) | Not found -#### enum_parameters.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### enum_parameters.ApiResponseFor404 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1231,7 +1213,6 @@ No authorization required # **fake_health_get** -> HealthCheckResult fake_health_get() Health check endpoint @@ -1268,16 +1249,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#fake_health_get.response_for_200.ApiResponse) | The instance started successfully -#### fake_health_get.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#fake_health_get.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HealthCheckResult**](../../models/HealthCheckResult.md) | | @@ -1291,7 +1272,6 @@ No authorization required # **group_parameters** -> group_parameters(required_string_grouprequired_boolean_grouprequired_int64_group) Fake endpoint to test group parameters (optional) @@ -1365,45 +1345,45 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | +[query_params](#group_parameters.RequestQueryParameters) | [RequestQueryParameters.Params](#group_parameters.RequestQueryParameters.Params) | | +header_params | RequestHeaderParameters.Params | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -required_string_group | RequiredStringGroupSchema | | -required_int64_group | RequiredInt64GroupSchema | | -string_group | StringGroupSchema | | optional -int64_group | Int64GroupSchema | | optional +required_string_group | [RequestQueryParameters.Schemas.required_string_group](#group_parameters.RequestQueryParameters.Schemas.required_string_group) | | +required_int64_group | [RequestQueryParameters.Schemas.required_int64_group](#group_parameters.RequestQueryParameters.Schemas.required_int64_group) | | +string_group | [RequestQueryParameters.Schemas.string_group](#group_parameters.RequestQueryParameters.Schemas.string_group) | | optional +int64_group | [RequestQueryParameters.Schemas.int64_group](#group_parameters.RequestQueryParameters.Schemas.int64_group) | | optional -# RequiredStringGroupSchema +# RequestQueryParameters.Schemas.required_string_group ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | -# RequiredInt64GroupSchema +# RequestQueryParameters.Schemas.required_int64_group ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer -# StringGroupSchema +# RequestQueryParameters.Schemas.string_group ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | -# Int64GroupSchema +# RequestQueryParameters.Schemas.int64_group ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1411,21 +1391,21 @@ Input Type | Accessed Type | Description | Notes decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer ### header_params -#### RequestHeaderParams +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -required_boolean_group | RequiredBooleanGroupSchema | | -boolean_group | BooleanGroupSchema | | optional +required_boolean_group | required_boolean_group | | +boolean_group | boolean_group | | optional -# RequiredBooleanGroupSchema +# required_boolean_group ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | -# BooleanGroupSchema +# boolean_group ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1437,9 +1417,9 @@ bool, | BoolClass, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#group_parameters.ApiResponseFor200) | succeeded +200 | [response_for_200.ApiResponse](#group_parameters.response_for_200.ApiResponse) | succeeded -#### group_parameters.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1454,7 +1434,6 @@ headers | Unset | headers were not defined | # **inline_additional_properties** -> inline_additional_properties(request_body) test inline additionalProperties @@ -1491,15 +1470,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#inline_additional_properties.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#inline_additional_properties.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1516,9 +1495,9 @@ Key | Input Type | Accessed Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#inline_additional_properties.response_for_200.ApiResponse) | successful operation -#### inline_additional_properties.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1533,7 +1512,6 @@ No authorization required # **inline_composition** -> bool, date, datetime, dict, float, int, list, str, none_type inline_composition() testing composed schemas at inline locations @@ -1576,17 +1554,17 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, multipart/form-data, Unset] | optional, default is unset | -query_params | RequestQueryParams | | +[body](#inline_composition.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#inline_composition.RequestBody.Schemas.application_json), [RequestBody.Schemas.multipart_form_data](#inline_composition.RequestBody.Schemas.multipart_form_data), Unset] | optional, default is unset | +[query_params](#inline_composition.RequestQueryParameters) | [RequestQueryParameters.Params](#inline_composition.RequestQueryParameters.Params) | | 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 +### body -# application/json +# RequestBody.Schemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1606,7 +1584,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# multipart/form-data +# RequestBody.Schemas.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1639,16 +1617,16 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -### query_params -#### RequestQueryParams +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -compositionAtRoot | CompositionAtRootSchema | | optional -compositionInProperty | CompositionInPropertySchema | | optional +compositionAtRoot | [RequestQueryParameters.Schemas.compositionAtRoot](#inline_composition.RequestQueryParameters.Schemas.compositionAtRoot) | | optional +compositionInProperty | [RequestQueryParameters.Schemas.compositionInProperty](#inline_composition.RequestQueryParameters.Schemas.compositionInProperty) | | optional -# CompositionAtRootSchema +# RequestQueryParameters.Schemas.compositionAtRoot ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1668,7 +1646,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# CompositionInPropertySchema +# RequestQueryParameters.Schemas.compositionInProperty ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1706,16 +1684,16 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#inline_composition.ApiResponseFor200) | success +200 | [response_for_200.ApiResponse](#inline_composition.response_for_200.ApiResponse) | success -#### inline_composition.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, multipart/form-data, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#inline_composition.response_for_200.BodySchemas.application_json), [response_for_200.BodySchemas.multipart_form_data](#inline_composition.response_for_200.BodySchemas.multipart_form_data), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1735,7 +1713,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# multipart/form-data +# response_for_200.BodySchemas.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1776,7 +1754,6 @@ No authorization required # **json_form_data** -> json_form_data() test json serialization of form data @@ -1814,15 +1791,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/x-www-form-urlencoded, Unset] | optional, default is unset | +[body](#json_form_data.RequestBody) | typing.Union[[RequestBody.Schemas.application_x_www_form_urlencoded](#json_form_data.RequestBody.Schemas.application_x_www_form_urlencoded), 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 +### body -# application/x-www-form-urlencoded +# RequestBody.Schemas.application_x_www_form_urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1841,9 +1818,9 @@ Key | Input Type | Accessed Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#json_form_data.response_for_200.ApiResponse) | successful operation -#### json_form_data.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1858,7 +1835,6 @@ No authorization required # **json_patch** -> json_patch() json patch @@ -1898,15 +1874,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json-patch+json, Unset] | optional, default is unset | +[body](#json_patch.RequestBody) | typing.Union[[RequestBody.Schemas.application_json_patchjson](#json_patch.RequestBody.Schemas.application_json_patchjson), 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 +### body -# application/json-patch+json +# RequestBody.Schemas.application_json_patchjson Type | Description | Notes ------------- | ------------- | ------------- [**JSONPatchRequest**](../../models/JSONPatchRequest.md) | | @@ -1917,9 +1893,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#json_patch.ApiResponseFor200) | OK +200 | [response_for_200.ApiResponse](#json_patch.response_for_200.ApiResponse) | OK -#### json_patch.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1934,7 +1910,6 @@ No authorization required # **json_with_charset** -> bool, date, datetime, dict, float, int, list, str, none_type json_with_charset() json with charset tx and rx @@ -1970,16 +1945,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json; charset=utf-8, Unset] | optional, default is unset | +[body](#json_with_charset.RequestBody) | typing.Union[[RequestBody.Schemas.application_json_charsetutf_8](#json_with_charset.RequestBody.Schemas.application_json_charsetutf_8), 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 +### body -# application/json; charset=utf-8 +# RequestBody.Schemas.application_json_charsetutf_8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1991,16 +1966,16 @@ dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#json_with_charset.ApiResponseFor200) | success +200 | [response_for_200.ApiResponse](#json_with_charset.response_for_200.ApiResponse) | success -#### json_with_charset.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json; charset=utf-8, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json_charsetutf_8](#json_with_charset.response_for_200.BodySchemas.application_json_charsetutf_8), ] | | headers | Unset | headers were not defined | -# application/json; charset=utf-8 +# response_for_200.BodySchemas.application_json_charsetutf_8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2015,8 +1990,6 @@ No authorization required # **mammal** -> Mammal mammal(mammal) - Test serialization of mammals @@ -2057,16 +2030,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#mammal.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#mammal.RequestBody.Schemas.application_json)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -2077,16 +2050,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#mammal.ApiResponseFor200) | Output mammal +200 | [response_for_200.ApiResponse](#mammal.response_for_200.ApiResponse) | Output mammal -#### mammal.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#mammal.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -2100,8 +2073,6 @@ No authorization required # **number_with_validations** -> NumberWithValidations number_with_validations() - Test serialization of outer number types @@ -2138,16 +2109,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#number_with_validations.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#number_with_validations.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2158,16 +2129,16 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#number_with_validations.response_for_200.ApiResponse) | Output number -#### number_with_validations.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#number_with_validations.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2181,7 +2152,6 @@ No authorization required # **object_in_query** -> object_in_query() user list @@ -2220,20 +2190,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#object_in_query.RequestQueryParameters) | [RequestQueryParameters.Params](#object_in_query.RequestQueryParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -mapBean | MapBeanSchema | | optional +mapBean | [RequestQueryParameters.Schemas.mapBean](#object_in_query.RequestQueryParameters.Schemas.mapBean) | | optional -# MapBeanSchema +# RequestQueryParameters.Schemas.mapBean ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2251,9 +2221,9 @@ Key | Input Type | Accessed Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#object_in_query.ApiResponseFor200) | ok +200 | [response_for_200.ApiResponse](#object_in_query.response_for_200.ApiResponse) | ok -#### object_in_query.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2268,8 +2238,6 @@ No authorization required # **object_model_with_ref_props** -> ObjectModelWithRefProps object_model_with_ref_props() - Test serialization of object with $refed properties @@ -2310,16 +2278,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#object_model_with_ref_props.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#object_model_with_ref_props.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2330,16 +2298,16 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#object_model_with_ref_props.response_for_200.ApiResponse) | Output model -#### object_model_with_ref_props.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#object_model_with_ref_props.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2353,7 +2321,6 @@ No authorization required # **parameter_collisions** -> bool, date, datetime, dict, float, int, list, str, none_type parameter_collisions(_3a_b5ab2_self3a_b6) parameter collision case @@ -2446,67 +2413,67 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | -cookie_params | RequestCookieParams | | +[body](#parameter_collisions.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#parameter_collisions.RequestBody.Schemas.application_json), Unset] | optional, default is unset | +[query_params](#parameter_collisions.RequestQueryParameters) | [RequestQueryParameters.Params](#parameter_collisions.RequestQueryParameters.Params) | | +header_params | RequestHeaderParameters.Params | | +path_params | RequestPathParameters.Params | | +cookie_params | RequestCookieParameters.Params | | 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 +### body -# application/json +# RequestBody.Schemas.application_json ## 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | optional -aB | ABSchema | | optional -Ab | AbSchema | | optional -self | ModelSelfSchema | | optional -A-B | ABSchema | | optional +1 | [RequestQueryParameters.Schemas._1](#parameter_collisions.RequestQueryParameters.Schemas._1) | | optional +aB | [RequestQueryParameters.Schemas.aB](#parameter_collisions.RequestQueryParameters.Schemas.aB) | | optional +Ab | [RequestQueryParameters.Schemas.Ab](#parameter_collisions.RequestQueryParameters.Schemas.Ab) | | optional +self | [RequestQueryParameters.Schemas._self](#parameter_collisions.RequestQueryParameters.Schemas._self) | | optional +A-B | [RequestQueryParameters.Schemas.a_b](#parameter_collisions.RequestQueryParameters.Schemas.a_b) | | optional -# Model1Schema +# RequestQueryParameters.Schemas._1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# RequestQueryParameters.Schemas.aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# AbSchema +# RequestQueryParameters.Schemas.Ab ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ModelSelfSchema +# RequestQueryParameters.Schemas._self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# RequestQueryParameters.Schemas.a_b ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2514,37 +2481,37 @@ Input Type | Accessed Type | Description | Notes str, | str, | | ### header_params -#### RequestHeaderParams +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | optional -aB | ABSchema | | optional -self | ModelSelfSchema | | optional -A-B | ABSchema | | optional +1 | 1 | | optional +aB | aB | | optional +self | self | | optional +A-B | A-B | | optional -# Model1Schema +# 1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ModelSelfSchema +# self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# A-B ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2552,45 +2519,45 @@ Input Type | Accessed Type | Description | Notes str, | str, | | ### path_params -#### RequestPathParams +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | -aB | ABSchema | | -Ab | AbSchema | | -self | ModelSelfSchema | | -A-B | ABSchema | | +1 | 1 | | +aB | aB | | +Ab | Ab | | +self | self | | +A-B | A-B | | -# Model1Schema +# 1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# AbSchema +# Ab ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ModelSelfSchema +# self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# A-B ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2598,45 +2565,45 @@ Input Type | Accessed Type | Description | Notes str, | str, | | ### cookie_params -#### RequestCookieParams +#### RequestCookieParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | optional -aB | ABSchema | | optional -Ab | AbSchema | | optional -self | ModelSelfSchema | | optional -A-B | ABSchema | | optional +1 | 1 | | optional +aB | aB | | optional +Ab | Ab | | optional +self | self | | optional +A-B | A-B | | optional -# Model1Schema +# 1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# AbSchema +# Ab ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ModelSelfSchema +# self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ABSchema +# A-B ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2648,16 +2615,16 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#parameter_collisions.ApiResponseFor200) | success +200 | [response_for_200.ApiResponse](#parameter_collisions.response_for_200.ApiResponse) | success -#### parameter_collisions.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#parameter_collisions.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2672,7 +2639,6 @@ No authorization required # **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 @@ -2710,14 +2676,14 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#query_param_with_json_content_type.RequestQueryParameters) | [RequestQueryParameters.Params](#query_param_with_json_content_type.RequestQueryParameters.Params) | | 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -2729,16 +2695,16 @@ someParam | | | 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 +200 | [response_for_200.ApiResponse](#query_param_with_json_content_type.response_for_200.ApiResponse) | success -#### query_param_with_json_content_type.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#query_param_with_json_content_type.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2753,8 +2719,6 @@ No authorization required # **query_parameter_collection_format** -> query_parameter_collection_format(pipeioutilhttpurlcontextref_param) - To test the collection format in query parameters @@ -2807,25 +2771,25 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#query_parameter_collection_format.RequestQueryParameters) | [RequestQueryParameters.Params](#query_parameter_collection_format.RequestQueryParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -pipe | PipeSchema | | -ioutil | IoutilSchema | | -http | HttpSchema | | -url | UrlSchema | | -context | ContextSchema | | -refParam | RefParamSchema | | +pipe | [RequestQueryParameters.Schemas.pipe](#query_parameter_collection_format.RequestQueryParameters.Schemas.pipe) | | +ioutil | [RequestQueryParameters.Schemas.ioutil](#query_parameter_collection_format.RequestQueryParameters.Schemas.ioutil) | | +http | [RequestQueryParameters.Schemas.http](#query_parameter_collection_format.RequestQueryParameters.Schemas.http) | | +url | [RequestQueryParameters.Schemas.url](#query_parameter_collection_format.RequestQueryParameters.Schemas.url) | | +context | [RequestQueryParameters.Schemas.context](#query_parameter_collection_format.RequestQueryParameters.Schemas.context) | | +refParam | [RequestQueryParameters.Schemas.refParam](#query_parameter_collection_format.RequestQueryParameters.Schemas.refParam) | | -# PipeSchema +# RequestQueryParameters.Schemas.pipe ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2837,7 +2801,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# IoutilSchema +# RequestQueryParameters.Schemas.ioutil ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2849,7 +2813,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# HttpSchema +# RequestQueryParameters.Schemas.http ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2861,7 +2825,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# UrlSchema +# RequestQueryParameters.Schemas.url ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2873,7 +2837,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# ContextSchema +# RequestQueryParameters.Schemas.context ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2885,7 +2849,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# RefParamSchema +# RequestQueryParameters.Schemas.refParam Type | Description | Notes ------------- | ------------- | ------------- [**StringWithValidation**](../../models/StringWithValidation.md) | | @@ -2896,9 +2860,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#query_parameter_collection_format.response_for_200.ApiResponse) | Success -#### query_parameter_collection_format.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2913,7 +2877,6 @@ No authorization required # **ref_object_in_query** -> ref_object_in_query() user list @@ -2953,20 +2916,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#ref_object_in_query.RequestQueryParameters) | [RequestQueryParameters.Params](#ref_object_in_query.RequestQueryParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -mapBean | MapBeanSchema | | optional +mapBean | [RequestQueryParameters.Schemas.mapBean](#ref_object_in_query.RequestQueryParameters.Schemas.mapBean) | | optional -# MapBeanSchema +# RequestQueryParameters.Schemas.mapBean Type | Description | Notes ------------- | ------------- | ------------- [**Foo**](../../models/Foo.md) | | @@ -2977,9 +2940,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#ref_object_in_query.response_for_200.ApiResponse) | ok -#### ref_object_in_query.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2994,7 +2957,6 @@ No authorization required # **response_without_schema** -> response_without_schema() receives a response without schema @@ -3030,9 +2992,9 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#response_without_schema.response_for_200.ApiResponse) | contents without schema definition -#### response_without_schema.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3047,8 +3009,6 @@ No authorization required # **string** -> String string() - Test serialization of outer string types @@ -3085,16 +3045,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#string.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#string.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**String**](../../models/String.md) | | @@ -3105,16 +3065,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#string.ApiResponseFor200) | Output string +200 | [response_for_200.ApiResponse](#string.response_for_200.ApiResponse) | Output string -#### string.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#string.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**String**](../../models/String.md) | | @@ -3128,8 +3088,6 @@ No authorization required # **string_enum** -> StringEnum string_enum() - Test serialization of outer enum @@ -3166,16 +3124,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#string_enum.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#string_enum.RequestBody.Schemas.application_json), 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3186,16 +3144,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#string_enum.ApiResponseFor200) | Output enum +200 | [response_for_200.ApiResponse](#string_enum.response_for_200.ApiResponse) | Output enum -#### string_enum.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#string_enum.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3209,7 +3167,6 @@ No authorization required # **upload_download_file** -> file_type upload_download_file(body) uploads a file and downloads a file using application/octet-stream @@ -3245,16 +3202,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/octet-stream] | required | +[body](#upload_download_file.RequestBody) | typing.Union[[RequestBody.Schemas.application_octet_stream](#upload_download_file.RequestBody.Schemas.application_octet_stream)] | 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 +### body -# application/octet-stream +# RequestBody.Schemas.application_octet_stream file to upload @@ -3268,16 +3225,16 @@ bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | 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 +200 | [response_for_200.ApiResponse](#upload_download_file.response_for_200.ApiResponse) | successful operation -#### upload_download_file.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/octet-stream, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_octet_stream](#upload_download_file.response_for_200.BodySchemas.application_octet_stream), ] | | headers | Unset | headers were not defined | -# application/octet-stream +# response_for_200.BodySchemas.application_octet_stream file to download @@ -3294,7 +3251,6 @@ No authorization required # **upload_file** -> ApiResponse upload_file() uploads a file using multipart/form-data @@ -3333,16 +3289,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[multipart/form-data, Unset] | optional, default is unset | +[body](#upload_file.RequestBody) | typing.Union[[RequestBody.Schemas.multipart_form_data](#upload_file.RequestBody.Schemas.multipart_form_data), 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 +### body -# multipart/form-data +# RequestBody.Schemas.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -3361,16 +3317,16 @@ Key | Input Type | Accessed Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_file.ApiResponseFor200) | successful operation +200 | [response_for_200.ApiResponse](#upload_file.response_for_200.ApiResponse) | successful operation -#### upload_file.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_file.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.md) | | @@ -3384,7 +3340,6 @@ No authorization required # **upload_files** -> ApiResponse upload_files() uploads files using multipart/form-data @@ -3424,16 +3379,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[multipart/form-data, Unset] | optional, default is unset | +[body](#upload_files.RequestBody) | typing.Union[[RequestBody.Schemas.multipart_form_data](#upload_files.RequestBody.Schemas.multipart_form_data), 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 +### body -# multipart/form-data +# RequestBody.Schemas.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -3463,16 +3418,16 @@ items | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_files.ApiResponseFor200) | successful operation +200 | [response_for_200.ApiResponse](#upload_files.response_for_200.ApiResponse) | successful operation -#### upload_files.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_files.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.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 index 710431645a4..8a5209ae4db 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md @@ -9,7 +9,6 @@ Method | HTTP request | Description # **classname** -> Client classname(client) To test class name in snake case @@ -61,16 +60,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#classname.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#classname.RequestBody.Schemas.application_json)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -81,16 +80,16 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#classname.ApiResponseFor200) | successful operation +200 | [response_for_200.ApiResponse](#classname.response_for_200.ApiResponse) | successful operation -#### classname.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#classname.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.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 index 53535817f95..7ffc2a7993f 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -17,7 +17,6 @@ Method | HTTP request | Description # **add_pet** -> add_pet(pet) Add a new pet to the store @@ -143,22 +142,22 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, application/xml] | required | +[body](#add_pet.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#add_pet.RequestBody.Schemas.application_json), [RequestBody.Schemas.application_xml](#add_pet.RequestBody.Schemas.application_xml)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# application/xml +# RequestBody.Schemas.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -169,17 +168,17 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#add_pet.response_for_200.ApiResponse) | Ok +405 | [response_for_405.ApiResponse](#add_pet.response_for_405.ApiResponse) | Invalid input -#### add_pet.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### add_pet.ApiResponseFor405 +#### response_for_405.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -194,7 +193,6 @@ headers | Unset | headers were not defined | # **delete_pet** -> delete_pet(pet_id) Deletes a pet @@ -261,20 +259,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | +header_params | RequestHeaderParameters.Params | | +path_params | RequestPathParameters.Params | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -api_key | ApiKeySchema | | optional +api_key | api_key | | optional -# ApiKeySchema +# api_key ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -282,13 +280,13 @@ Input Type | Accessed Type | Description | Notes str, | str, | | ### path_params -#### RequestPathParams +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | +petId | petId | | -# PetIdSchema +# petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -300,9 +298,9 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer 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 +400 | [response_for_400.ApiResponse](#delete_pet.response_for_400.ApiResponse) | Invalid pet value -#### delete_pet.ApiResponseFor400 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -317,7 +315,6 @@ headers | Unset | headers were not defined | # **find_pets_by_status** -> [Pet] find_pets_by_status(status) Finds Pets by status @@ -430,21 +427,21 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#find_pets_by_status.RequestQueryParameters) | [RequestQueryParameters.Params](#find_pets_by_status.RequestQueryParameters.Params) | | 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -status | StatusSchema | | +status | [RequestQueryParameters.Schemas.status](#find_pets_by_status.RequestQueryParameters.Schemas.status) | | -# StatusSchema +# RequestQueryParameters.Schemas.status ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -461,17 +458,17 @@ items | str, | str, | | must be one of ["available", "pending", "sold", ] if 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 +200 | [response_for_200.ApiResponse](#find_pets_by_status.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#find_pets_by_status.response_for_400.ApiResponse) | Invalid status value -#### find_pets_by_status.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#find_pets_by_status.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#find_pets_by_status.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/xml +# response_for_200.BodySchemas.application_xml ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -483,7 +480,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -495,7 +492,7 @@ 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 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -510,7 +507,6 @@ headers | Unset | headers were not defined | # **find_pets_by_tags** -> [Pet] find_pets_by_tags(tags) Finds Pets by tags @@ -623,21 +619,21 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#find_pets_by_tags.RequestQueryParameters) | [RequestQueryParameters.Params](#find_pets_by_tags.RequestQueryParameters.Params) | | 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -tags | TagsSchema | | +tags | [RequestQueryParameters.Schemas.tags](#find_pets_by_tags.RequestQueryParameters.Schemas.tags) | | -# TagsSchema +# RequestQueryParameters.Schemas.tags ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -654,17 +650,17 @@ items | str, | str, | | 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 +200 | [response_for_200.ApiResponse](#find_pets_by_tags.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#find_pets_by_tags.response_for_400.ApiResponse) | Invalid tag value -#### find_pets_by_tags.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#find_pets_by_tags.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#find_pets_by_tags.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/xml +# response_for_200.BodySchemas.application_xml ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -676,7 +672,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -688,7 +684,7 @@ 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 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -703,7 +699,6 @@ headers | Unset | headers were not defined | # **get_pet_by_id** -> Pet get_pet_by_id(pet_id) Find pet by ID @@ -754,20 +749,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | 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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | +petId | petId | | -# PetIdSchema +# petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -779,37 +774,37 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer 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 +200 | [response_for_200.ApiResponse](#get_pet_by_id.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#get_pet_by_id.response_for_400.ApiResponse) | Invalid ID supplied +404 | [response_for_404.ApiResponse](#get_pet_by_id.response_for_404.ApiResponse) | Pet not found -#### get_pet_by_id.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#get_pet_by_id.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#get_pet_by_id.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/xml +# response_for_200.BodySchemas.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -#### get_pet_by_id.ApiResponseFor400 +#### response_for_400.ApiResponse 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 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -824,7 +819,6 @@ headers | Unset | headers were not defined | # **update_pet** -> update_pet(pet) Update an existing pet @@ -948,22 +942,22 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, application/xml] | required | +[body](#update_pet.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#update_pet.RequestBody.Schemas.application_json), [RequestBody.Schemas.application_xml](#update_pet.RequestBody.Schemas.application_xml)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# application/xml +# RequestBody.Schemas.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -974,25 +968,25 @@ Type | Description | Notes 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 +400 | [response_for_400.ApiResponse](#update_pet.response_for_400.ApiResponse) | Invalid ID supplied +404 | [response_for_404.ApiResponse](#update_pet.response_for_404.ApiResponse) | Pet not found +405 | [response_for_405.ApiResponse](#update_pet.response_for_405.ApiResponse) | Validation exception -#### update_pet.ApiResponseFor400 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### update_pet.ApiResponseFor404 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### update_pet.ApiResponseFor405 +#### response_for_405.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1007,7 +1001,6 @@ headers | Unset | headers were not defined | # **update_pet_with_form** -> update_pet_with_form(pet_id) Updates a pet in the store with form data @@ -1072,16 +1065,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/x-www-form-urlencoded, Unset] | optional, default is unset | -path_params | RequestPathParams | | +[body](#update_pet_with_form.RequestBody) | typing.Union[[RequestBody.Schemas.application_x_www_form_urlencoded](#update_pet_with_form.RequestBody.Schemas.application_x_www_form_urlencoded), Unset] | optional, default is unset | +path_params | RequestPathParameters.Params | | 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 +### body -# application/x-www-form-urlencoded +# RequestBody.Schemas.application_x_www_form_urlencoded ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1096,13 +1089,13 @@ Key | Input Type | Accessed Type | Description | Notes **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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | +petId | petId | | -# PetIdSchema +# petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1114,9 +1107,9 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer 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 +405 | [response_for_405.ApiResponse](#update_pet_with_form.response_for_405.ApiResponse) | Invalid input -#### update_pet_with_form.ApiResponseFor405 +#### response_for_405.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1131,7 +1124,6 @@ headers | Unset | headers were not defined | # **upload_file_with_required_file** -> ApiResponse upload_file_with_required_file(pet_id) uploads an image (required) @@ -1198,17 +1190,17 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[multipart/form-data, Unset] | optional, default is unset | -path_params | RequestPathParams | | +[body](#upload_file_with_required_file.RequestBody) | typing.Union[[RequestBody.Schemas.multipart_form_data](#upload_file_with_required_file.RequestBody.Schemas.multipart_form_data), Unset] | optional, default is unset | +path_params | RequestPathParameters.Params | | 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 +### body -# multipart/form-data +# RequestBody.Schemas.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1223,13 +1215,13 @@ Key | Input Type | Accessed Type | Description | Notes **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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | +petId | petId | | -# PetIdSchema +# petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1241,16 +1233,16 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer 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 +200 | [response_for_200.ApiResponse](#upload_file_with_required_file.response_for_200.ApiResponse) | successful operation -#### upload_file_with_required_file.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_file_with_required_file.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.md) | | @@ -1264,7 +1256,6 @@ Type | Description | Notes # **upload_image** -> ApiResponse upload_image(pet_id) uploads an image @@ -1331,17 +1322,17 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[multipart/form-data, Unset] | optional, default is unset | -path_params | RequestPathParams | | +[body](#upload_image.RequestBody) | typing.Union[[RequestBody.Schemas.multipart_form_data](#upload_image.RequestBody.Schemas.multipart_form_data), Unset] | optional, default is unset | +path_params | RequestPathParameters.Params | | 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 +### body -# multipart/form-data +# RequestBody.Schemas.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1356,13 +1347,13 @@ Key | Input Type | Accessed Type | Description | Notes **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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | +petId | petId | | -# PetIdSchema +# petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1374,16 +1365,16 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_image.ApiResponseFor200) | successful operation +200 | [response_for_200.ApiResponse](#upload_image.response_for_200.ApiResponse) | successful operation -#### upload_image.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_image.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.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 index 082b1984718..b69bab6ac6b 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description # **delete_order** -> delete_order(order_id) Delete purchase order by ID @@ -51,19 +50,19 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | OrderIdSchema | | +order_id | order_id | | -# OrderIdSchema +# order_id ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -75,17 +74,17 @@ str, | str, | | 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 +400 | [response_for_400.ApiResponse](#delete_order.response_for_400.ApiResponse) | Invalid ID supplied +404 | [response_for_404.ApiResponse](#delete_order.response_for_404.ApiResponse) | Order not found -#### delete_order.ApiResponseFor400 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### delete_order.ApiResponseFor404 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -100,7 +99,6 @@ No authorization required # **get_inventory** -> {str: (int,)} get_inventory() Returns pet inventories by status @@ -150,16 +148,16 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_inventory.ApiResponseFor200) | successful operation +200 | [response_for_200.ApiResponse](#get_inventory.response_for_200.ApiResponse) | successful operation -#### get_inventory.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#get_inventory.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -179,7 +177,6 @@ Key | Input Type | Accessed Type | Description | Notes # **get_order_by_id** -> Order get_order_by_id(order_id) Find purchase order by ID @@ -219,20 +216,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | 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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | OrderIdSchema | | +order_id | order_id | | -# OrderIdSchema +# order_id ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -244,37 +241,37 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer 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 +200 | [response_for_200.ApiResponse](#get_order_by_id.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#get_order_by_id.response_for_400.ApiResponse) | Invalid ID supplied +404 | [response_for_404.ApiResponse](#get_order_by_id.response_for_404.ApiResponse) | Order not found -#### get_order_by_id.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#get_order_by_id.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#get_order_by_id.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/xml +# response_for_200.BodySchemas.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -#### get_order_by_id.ApiResponseFor400 +#### response_for_400.ApiResponse 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 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -289,7 +286,6 @@ No authorization required # **place_order** -> Order place_order(order) Place an order for a pet @@ -333,16 +329,16 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#place_order.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#place_order.RequestBody.Schemas.application_json)] | 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 +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | @@ -353,29 +349,29 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#place_order.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#place_order.response_for_400.ApiResponse) | Invalid Order -#### place_order.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#place_order.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#place_order.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/xml +# response_for_200.BodySchemas.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -#### place_order.ApiResponseFor400 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md index c8665f5ce97..c8ada04e7bb 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -16,7 +16,6 @@ Method | HTTP request | Description # **create_user** -> create_user(user) Create user @@ -68,15 +67,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#create_user.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#create_user.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -87,9 +86,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#create_user.ApiResponseForDefault) | successful operation +default | [response_for_default.ApiResponse](#create_user.response_for_default.ApiResponse) | successful operation -#### create_user.ApiResponseForDefault +#### response_for_default.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -104,7 +103,6 @@ No authorization required # **create_users_with_array_input** -> create_users_with_array_input(user) Creates list of users with given input array @@ -156,15 +154,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#create_users_with_array_input.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#create_users_with_array_input.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -181,9 +179,9 @@ Class Name | Input Type | Accessed Type | Description | Notes 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 +default | [response_for_default.ApiResponse](#create_users_with_array_input.response_for_default.ApiResponse) | successful operation -#### create_users_with_array_input.ApiResponseForDefault +#### response_for_default.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -198,7 +196,6 @@ No authorization required # **create_users_with_list_input** -> create_users_with_list_input(user) Creates list of users with given input array @@ -250,15 +247,15 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#create_users_with_list_input.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#create_users_with_list_input.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -275,9 +272,9 @@ Class Name | Input Type | Accessed Type | Description | Notes 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 +default | [response_for_default.ApiResponse](#create_users_with_list_input.response_for_default.ApiResponse) | successful operation -#### create_users_with_list_input.ApiResponseForDefault +#### response_for_default.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -292,7 +289,6 @@ No authorization required # **delete_user** -> delete_user(username) Delete user @@ -331,19 +327,19 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | +username | username | | -# UsernameSchema +# username ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -355,17 +351,17 @@ str, | str, | | 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 +200 | [response_for_200.ApiResponse](#delete_user.response_for_200.ApiResponse) | Success +404 | [response_for_404.ApiResponse](#delete_user.response_for_404.ApiResponse) | User not found -#### delete_user.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### delete_user.ApiResponseFor404 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -380,7 +376,6 @@ No authorization required # **get_user_by_name** -> User get_user_by_name(username) Get user by user name @@ -418,20 +413,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +path_params | RequestPathParameters.Params | | 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 +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | +username | username | | -# UsernameSchema +# username ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -443,37 +438,37 @@ str, | str, | | 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 +200 | [response_for_200.ApiResponse](#get_user_by_name.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#get_user_by_name.response_for_400.ApiResponse) | Invalid username supplied +404 | [response_for_404.ApiResponse](#get_user_by_name.response_for_404.ApiResponse) | User not found -#### get_user_by_name.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#get_user_by_name.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#get_user_by_name.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/xml +# response_for_200.BodySchemas.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | -#### get_user_by_name.ApiResponseFor400 +#### response_for_400.ApiResponse 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 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -488,7 +483,6 @@ No authorization required # **login_user** -> str login_user(usernamepassword) Logs user into the system @@ -527,29 +521,29 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +[query_params](#login_user.RequestQueryParameters) | [RequestQueryParameters.Params](#login_user.RequestQueryParameters.Params) | | 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 +### query_params +#### RequestQueryParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | -password | PasswordSchema | | +username | [RequestQueryParameters.Schemas.username](#login_user.RequestQueryParameters.Schemas.username) | | +password | [RequestQueryParameters.Schemas.password](#login_user.RequestQueryParameters.Schemas.password) | | -# UsernameSchema +# RequestQueryParameters.Schemas.username ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# PasswordSchema +# RequestQueryParameters.Schemas.password ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -561,24 +555,24 @@ str, | str, | | 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 +200 | [response_for_200.ApiResponse](#login_user.response_for_200.ApiResponse) | successful operation +400 | [response_for_400.ApiResponse](#login_user.response_for_400.ApiResponse) | Invalid username/password supplied -#### login_user.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/xml, application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_xml](#login_user.response_for_200.BodySchemas.application_xml), [response_for_200.BodySchemas.application_json](#login_user.response_for_200.BodySchemas.application_json), ] | | headers | ResponseHeadersFor200 | | -# application/xml +# response_for_200.BodySchemas.application_xml ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# application/json +# response_for_200.BodySchemas.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -588,10 +582,10 @@ str, | str, | | Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -X-Rate-Limit | XRateLimitSchema | | optional -X-Expires-After | XExpiresAfterSchema | | optional +X-Rate-Limit | X-Rate-Limit | | optional +X-Expires-After | X-Expires-After | | optional -# XRateLimitSchema +# X-Rate-Limit calls per hour allowed by the user @@ -600,7 +594,7 @@ 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 +# X-Expires-After date in UTC when token expires @@ -610,7 +604,7 @@ 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 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -625,7 +619,6 @@ No authorization required # **logout_user** -> logout_user() Logs out current logged in user session @@ -661,9 +654,9 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#logout_user.ApiResponseForDefault) | successful operation +default | [response_for_default.ApiResponse](#logout_user.response_for_default.ApiResponse) | successful operation -#### logout_user.ApiResponseForDefault +#### response_for_default.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -678,7 +671,6 @@ No authorization required # **update_user** -> update_user(usernameuser) Updated user @@ -734,29 +726,29 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | -path_params | RequestPathParams | | +[body](#update_user.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#update_user.RequestBody.Schemas.application_json)] | required | +path_params | RequestPathParameters.Params | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | ### path_params -#### RequestPathParams +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | +username | username | | -# UsernameSchema +# username ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -768,17 +760,17 @@ str, | str, | | 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 +400 | [response_for_400.ApiResponse](#update_user.response_for_400.ApiResponse) | Invalid user supplied +404 | [response_for_404.ApiResponse](#update_user.response_for_404.ApiResponse) | User not found -#### update_user.ApiResponseFor400 +#### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | body | Unset | body was not defined | headers | Unset | headers were not defined | -#### update_user.ApiResponseFor404 +#### response_for_404.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.py index a6040f55770..da048e81b67 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.py @@ -32,24 +32,24 @@ class RequestQueryParameters: class Schemas: - RequiredStringGroupSchema = schemas.IntSchema - RequiredInt64GroupSchema = schemas.Int64Schema - StringGroupSchema = schemas.IntSchema - Int64GroupSchema = schemas.Int64Schema + required_string_group = schemas.IntSchema + required_int64_group = schemas.Int64Schema + string_group = schemas.IntSchema + int64_group = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_string_group': typing.Union[Schemas.RequiredStringGroupSchema, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[Schemas.RequiredInt64GroupSchema, decimal.Decimal, int, ], + 'required_string_group': typing.Union[Schemas.required_string_group, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[Schemas.required_int64_group, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'string_group': typing.Union[Schemas.StringGroupSchema, decimal.Decimal, int, ], - 'int64_group': typing.Union[Schemas.Int64GroupSchema, decimal.Decimal, int, ], + 'string_group': typing.Union[Schemas.string_group, decimal.Decimal, int, ], + 'int64_group': typing.Union[Schemas.int64_group, decimal.Decimal, int, ], }, total=False ) @@ -63,47 +63,47 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="required_string_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.RequiredStringGroupSchema, + schema=Schemas.required_string_group, required=True, explode=True, ), api_client.QueryParameter( name="required_int64_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.RequiredInt64GroupSchema, + schema=Schemas.required_int64_group, required=True, explode=True, ), api_client.QueryParameter( name="string_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.StringGroupSchema, + schema=Schemas.string_group, explode=True, ), api_client.QueryParameter( name="int64_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.Int64GroupSchema, + schema=Schemas.int64_group, explode=True, ), ] class RequestHeaderParameters: class Schemas: - RequiredBooleanGroupSchema = schemas.BoolSchema - BooleanGroupSchema = schemas.BoolSchema + required_boolean_group = schemas.BoolSchema + boolean_group = schemas.BoolSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_boolean_group': typing.Union[Schemas.RequiredBooleanGroupSchema, bool, ], + 'required_boolean_group': typing.Union[Schemas.required_boolean_group, bool, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'boolean_group': typing.Union[Schemas.BooleanGroupSchema, bool, ], + 'boolean_group': typing.Union[Schemas.boolean_group, bool, ], }, total=False ) @@ -117,13 +117,13 @@ class Params(RequiredParams, OptionalParams): api_client.HeaderParameter( name="required_boolean_group", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.RequiredBooleanGroupSchema, + schema=Schemas.required_boolean_group, required=True, ), api_client.HeaderParameter( name="boolean_group", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.BooleanGroupSchema, + schema=Schemas.boolean_group, ), ] _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.pyi index af1224dba8a..14768ee0b6a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/__init__.pyi @@ -31,24 +31,24 @@ from . import response_for_200 class RequestQueryParameters: class Schemas: - RequiredStringGroupSchema = schemas.IntSchema - RequiredInt64GroupSchema = schemas.Int64Schema - StringGroupSchema = schemas.IntSchema - Int64GroupSchema = schemas.Int64Schema + required_string_group = schemas.IntSchema + required_int64_group = schemas.Int64Schema + string_group = schemas.IntSchema + int64_group = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_string_group': typing.Union[Schemas.RequiredStringGroupSchema, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[Schemas.RequiredInt64GroupSchema, decimal.Decimal, int, ], + 'required_string_group': typing.Union[Schemas.required_string_group, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[Schemas.required_int64_group, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'string_group': typing.Union[Schemas.StringGroupSchema, decimal.Decimal, int, ], - 'int64_group': typing.Union[Schemas.Int64GroupSchema, decimal.Decimal, int, ], + 'string_group': typing.Union[Schemas.string_group, decimal.Decimal, int, ], + 'int64_group': typing.Union[Schemas.int64_group, decimal.Decimal, int, ], }, total=False ) @@ -62,47 +62,47 @@ class RequestQueryParameters: api_client.QueryParameter( name="required_string_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.RequiredStringGroupSchema, + schema=Schemas.required_string_group, required=True, explode=True, ), api_client.QueryParameter( name="required_int64_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.RequiredInt64GroupSchema, + schema=Schemas.required_int64_group, required=True, explode=True, ), api_client.QueryParameter( name="string_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.StringGroupSchema, + schema=Schemas.string_group, explode=True, ), api_client.QueryParameter( name="int64_group", style=api_client.ParameterStyle.FORM, - schema=Schemas.Int64GroupSchema, + schema=Schemas.int64_group, explode=True, ), ] class RequestHeaderParameters: class Schemas: - RequiredBooleanGroupSchema = schemas.BoolSchema - BooleanGroupSchema = schemas.BoolSchema + required_boolean_group = schemas.BoolSchema + boolean_group = schemas.BoolSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_boolean_group': typing.Union[Schemas.RequiredBooleanGroupSchema, bool, ], + 'required_boolean_group': typing.Union[Schemas.required_boolean_group, bool, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'boolean_group': typing.Union[Schemas.BooleanGroupSchema, bool, ], + 'boolean_group': typing.Union[Schemas.boolean_group, bool, ], }, total=False ) @@ -116,13 +116,13 @@ class RequestHeaderParameters: api_client.HeaderParameter( name="required_boolean_group", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.RequiredBooleanGroupSchema, + schema=Schemas.required_boolean_group, required=True, ), api_client.HeaderParameter( name="boolean_group", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.BooleanGroupSchema, + schema=Schemas.boolean_group, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py index e66b7bc5728..30c37126489 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.py @@ -35,7 +35,7 @@ class RequestQueryParameters: class Schemas: - class EnumQueryStringArraySchema( + class enum_query_string_array( schemas.ListSchema ): @@ -67,7 +67,7 @@ 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': + ) -> 'enum_query_string_array': return super().__new__( cls, arg, @@ -78,7 +78,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - class EnumQueryStringSchema( + class enum_query_string( schemas.EnumBase, schemas.StrSchema ): @@ -104,7 +104,7 @@ def XYZ(cls): return cls("(xyz)") - class EnumQueryIntegerSchema( + class enum_query_integer( schemas.EnumBase, schemas.Int32Schema ): @@ -126,7 +126,7 @@ def NEGATIVE_2(cls): return cls(-2) - class EnumQueryDoubleSchema( + class enum_query_double( schemas.EnumBase, schemas.Float64Schema ): @@ -156,10 +156,10 @@ def NEGATIVE_1_PT_2(cls): OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_query_string_array': typing.Union[Schemas.EnumQueryStringArraySchema, list, tuple, ], - 'enum_query_string': typing.Union[Schemas.EnumQueryStringSchema, str, ], - 'enum_query_integer': typing.Union[Schemas.EnumQueryIntegerSchema, decimal.Decimal, int, ], - 'enum_query_double': typing.Union[Schemas.EnumQueryDoubleSchema, decimal.Decimal, int, float, ], + 'enum_query_string_array': typing.Union[Schemas.enum_query_string_array, list, tuple, ], + 'enum_query_string': typing.Union[Schemas.enum_query_string, str, ], + 'enum_query_integer': typing.Union[Schemas.enum_query_integer, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[Schemas.enum_query_double, decimal.Decimal, int, float, ], }, total=False ) @@ -173,25 +173,25 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="enum_query_string_array", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryStringArraySchema, + schema=Schemas.enum_query_string_array, explode=True, ), api_client.QueryParameter( name="enum_query_string", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryStringSchema, + schema=Schemas.enum_query_string, explode=True, ), api_client.QueryParameter( name="enum_query_integer", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryIntegerSchema, + schema=Schemas.enum_query_integer, explode=True, ), api_client.QueryParameter( name="enum_query_double", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryDoubleSchema, + schema=Schemas.enum_query_double, explode=True, ), ] @@ -200,7 +200,7 @@ class RequestHeaderParameters: class Schemas: - class EnumHeaderStringArraySchema( + class enum_header_string_array( schemas.ListSchema ): @@ -232,7 +232,7 @@ 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': + ) -> 'enum_header_string_array': return super().__new__( cls, arg, @@ -243,7 +243,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - class EnumHeaderStringSchema( + class enum_header_string( schemas.EnumBase, schemas.StrSchema ): @@ -277,8 +277,8 @@ def XYZ(cls): OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_header_string_array': typing.Union[Schemas.EnumHeaderStringArraySchema, list, tuple, ], - 'enum_header_string': typing.Union[Schemas.EnumHeaderStringSchema, str, ], + 'enum_header_string_array': typing.Union[Schemas.enum_header_string_array, list, tuple, ], + 'enum_header_string': typing.Union[Schemas.enum_header_string, str, ], }, total=False ) @@ -292,12 +292,12 @@ class Params(RequiredParams, OptionalParams): api_client.HeaderParameter( name="enum_header_string_array", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.EnumHeaderStringArraySchema, + schema=Schemas.enum_header_string_array, ), api_client.HeaderParameter( name="enum_header_string", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.EnumHeaderStringSchema, + schema=Schemas.enum_header_string, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi index 0b777bbf738..868e35ada86 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/__init__.pyi @@ -34,7 +34,7 @@ class RequestQueryParameters: class Schemas: - class EnumQueryStringArraySchema( + class enum_query_string_array( schemas.ListSchema ): @@ -59,7 +59,7 @@ class RequestQueryParameters: 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': + ) -> 'enum_query_string_array': return super().__new__( cls, arg, @@ -70,7 +70,7 @@ class RequestQueryParameters: return super().__getitem__(i) - class EnumQueryStringSchema( + class enum_query_string( schemas.EnumBase, schemas.StrSchema ): @@ -88,7 +88,7 @@ class RequestQueryParameters: return cls("(xyz)") - class EnumQueryIntegerSchema( + class enum_query_integer( schemas.EnumBase, schemas.Int32Schema ): @@ -102,7 +102,7 @@ class RequestQueryParameters: return cls(-2) - class EnumQueryDoubleSchema( + class enum_query_double( schemas.EnumBase, schemas.Float64Schema ): @@ -124,10 +124,10 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_query_string_array': typing.Union[Schemas.EnumQueryStringArraySchema, list, tuple, ], - 'enum_query_string': typing.Union[Schemas.EnumQueryStringSchema, str, ], - 'enum_query_integer': typing.Union[Schemas.EnumQueryIntegerSchema, decimal.Decimal, int, ], - 'enum_query_double': typing.Union[Schemas.EnumQueryDoubleSchema, decimal.Decimal, int, float, ], + 'enum_query_string_array': typing.Union[Schemas.enum_query_string_array, list, tuple, ], + 'enum_query_string': typing.Union[Schemas.enum_query_string, str, ], + 'enum_query_integer': typing.Union[Schemas.enum_query_integer, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[Schemas.enum_query_double, decimal.Decimal, int, float, ], }, total=False ) @@ -141,25 +141,25 @@ class RequestQueryParameters: api_client.QueryParameter( name="enum_query_string_array", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryStringArraySchema, + schema=Schemas.enum_query_string_array, explode=True, ), api_client.QueryParameter( name="enum_query_string", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryStringSchema, + schema=Schemas.enum_query_string, explode=True, ), api_client.QueryParameter( name="enum_query_integer", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryIntegerSchema, + schema=Schemas.enum_query_integer, explode=True, ), api_client.QueryParameter( name="enum_query_double", style=api_client.ParameterStyle.FORM, - schema=Schemas.EnumQueryDoubleSchema, + schema=Schemas.enum_query_double, explode=True, ), ] @@ -168,7 +168,7 @@ class RequestHeaderParameters: class Schemas: - class EnumHeaderStringArraySchema( + class enum_header_string_array( schemas.ListSchema ): @@ -193,7 +193,7 @@ class RequestHeaderParameters: 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': + ) -> 'enum_header_string_array': return super().__new__( cls, arg, @@ -204,7 +204,7 @@ class RequestHeaderParameters: return super().__getitem__(i) - class EnumHeaderStringSchema( + class enum_header_string( schemas.EnumBase, schemas.StrSchema ): @@ -230,8 +230,8 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_header_string_array': typing.Union[Schemas.EnumHeaderStringArraySchema, list, tuple, ], - 'enum_header_string': typing.Union[Schemas.EnumHeaderStringSchema, str, ], + 'enum_header_string_array': typing.Union[Schemas.enum_header_string_array, list, tuple, ], + 'enum_header_string': typing.Union[Schemas.enum_header_string, str, ], }, total=False ) @@ -245,12 +245,12 @@ class RequestHeaderParameters: api_client.HeaderParameter( name="enum_header_string_array", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.EnumHeaderStringArraySchema, + schema=Schemas.enum_header_string_array, ), api_client.HeaderParameter( name="enum_header_string", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.EnumHeaderStringSchema, + schema=Schemas.enum_header_string, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.py index 00efb75aebf..a835e5f4ae5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.py @@ -34,13 +34,13 @@ class RequestQueryParameters: class Schemas: - QuerySchema = schemas.StrSchema + query = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[Schemas.QuerySchema, str, ], + 'query': typing.Union[Schemas.query, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,7 +59,7 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="query", style=api_client.ParameterStyle.FORM, - schema=Schemas.QuerySchema, + schema=Schemas.query, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.pyi index 1b9010064c2..9a02a9d2949 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/__init__.pyi @@ -33,13 +33,13 @@ from . import response_for_200 class RequestQueryParameters: class Schemas: - QuerySchema = schemas.StrSchema + query = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[Schemas.QuerySchema, str, ], + 'query': typing.Union[Schemas.query, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -58,7 +58,7 @@ class RequestQueryParameters: api_client.QueryParameter( name="query", style=api_client.ParameterStyle.FORM, - schema=Schemas.QuerySchema, + schema=Schemas.query, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.py index 7e24ed1ef75..66ab8139986 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.py @@ -31,17 +31,17 @@ class RequestQueryParameters: class Schemas: - SomeVarSchema = schemas.StrSchema - SomeVarSchema = schemas.StrSchema - SomeVarSchema = schemas.StrSchema + someVar = schemas.StrSchema + SomeVar = schemas.StrSchema + some_var = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[Schemas.SomeVarSchema, str, ], - 'SomeVar': typing.Union[Schemas.SomeVarSchema, str, ], - 'some_var': typing.Union[Schemas.SomeVarSchema, str, ], + 'someVar': typing.Union[Schemas.someVar, str, ], + 'SomeVar': typing.Union[Schemas.SomeVar, str, ], + 'some_var': typing.Union[Schemas.some_var, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -60,21 +60,21 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="someVar", style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVarSchema, + schema=Schemas.someVar, required=True, explode=True, ), api_client.QueryParameter( name="SomeVar", style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVarSchema, + schema=Schemas.SomeVar, required=True, explode=True, ), api_client.QueryParameter( name="some_var", style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVarSchema, + schema=Schemas.some_var, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.pyi index 4964daaa94a..6d7cc22808c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/__init__.pyi @@ -30,17 +30,17 @@ from . import response_for_200 class RequestQueryParameters: class Schemas: - SomeVarSchema = schemas.StrSchema - SomeVarSchema = schemas.StrSchema - SomeVarSchema = schemas.StrSchema + someVar = schemas.StrSchema + SomeVar = schemas.StrSchema + some_var = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[Schemas.SomeVarSchema, str, ], - 'SomeVar': typing.Union[Schemas.SomeVarSchema, str, ], - 'some_var': typing.Union[Schemas.SomeVarSchema, str, ], + 'someVar': typing.Union[Schemas.someVar, str, ], + 'SomeVar': typing.Union[Schemas.SomeVar, str, ], + 'some_var': typing.Union[Schemas.some_var, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,21 +59,21 @@ class RequestQueryParameters: api_client.QueryParameter( name="someVar", style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVarSchema, + schema=Schemas.someVar, required=True, explode=True, ), api_client.QueryParameter( name="SomeVar", style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVarSchema, + schema=Schemas.SomeVar, required=True, explode=True, ), api_client.QueryParameter( name="some_var", style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVarSchema, + schema=Schemas.some_var, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py index d3468a8b26f..2e0c3e6818e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py @@ -32,13 +32,13 @@ class RequestPathParameters: class Schemas: - IdSchema = schemas.StrSchema + id = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[Schemas.IdSchema, str, ], + 'id': typing.Union[Schemas.id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,7 +57,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="id", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.IdSchema, + schema=Schemas.id, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.pyi index b015e26decd..eb86b5b2807 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/__init__.pyi @@ -31,13 +31,13 @@ from . import response_for_default class RequestPathParameters: class Schemas: - IdSchema = schemas.StrSchema + id = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[Schemas.IdSchema, str, ], + 'id': typing.Union[Schemas.id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,7 +56,7 @@ class RequestPathParameters: api_client.PathParameter( name="id", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.IdSchema, + schema=Schemas.id, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py index f463f0d02b7..a9eb4d018a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.py @@ -34,7 +34,7 @@ class RequestQueryParameters: class Schemas: - class CompositionAtRootSchema( + class compositionAtRoot( schemas.ComposedSchema, ): @@ -70,7 +70,7 @@ def __new__( *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[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': + ) -> 'compositionAtRoot': return super().__new__( cls, *args, @@ -79,7 +79,7 @@ def __new__( ) - class CompositionInPropertySchema( + class compositionInProperty( schemas.DictSchema ): @@ -163,7 +163,7 @@ def __new__( 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': + ) -> 'compositionInProperty': return super().__new__( cls, *args, @@ -181,8 +181,8 @@ def __new__( OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'compositionAtRoot': typing.Union[Schemas.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[Schemas.CompositionInPropertySchema, dict, frozendict.frozendict, ], + 'compositionAtRoot': typing.Union[Schemas.compositionAtRoot, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + 'compositionInProperty': typing.Union[Schemas.compositionInProperty, dict, frozendict.frozendict, ], }, total=False ) @@ -196,13 +196,13 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="compositionAtRoot", style=api_client.ParameterStyle.FORM, - schema=Schemas.CompositionAtRootSchema, + schema=Schemas.compositionAtRoot, explode=True, ), api_client.QueryParameter( name="compositionInProperty", style=api_client.ParameterStyle.FORM, - schema=Schemas.CompositionInPropertySchema, + schema=Schemas.compositionInProperty, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi index f227aabf776..8e4fe6583a6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/__init__.pyi @@ -33,7 +33,7 @@ class RequestQueryParameters: class Schemas: - class CompositionAtRootSchema( + class compositionAtRoot( schemas.ComposedSchema, ): @@ -66,7 +66,7 @@ class RequestQueryParameters: *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[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': + ) -> 'compositionAtRoot': return super().__new__( cls, *args, @@ -75,7 +75,7 @@ class RequestQueryParameters: ) - class CompositionInPropertySchema( + class compositionInProperty( schemas.DictSchema ): @@ -156,7 +156,7 @@ class RequestQueryParameters: 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': + ) -> 'compositionInProperty': return super().__new__( cls, *args, @@ -174,8 +174,8 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'compositionAtRoot': typing.Union[Schemas.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[Schemas.CompositionInPropertySchema, dict, frozendict.frozendict, ], + 'compositionAtRoot': typing.Union[Schemas.compositionAtRoot, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + 'compositionInProperty': typing.Union[Schemas.compositionInProperty, dict, frozendict.frozendict, ], }, total=False ) @@ -189,13 +189,13 @@ class RequestQueryParameters: api_client.QueryParameter( name="compositionAtRoot", style=api_client.ParameterStyle.FORM, - schema=Schemas.CompositionAtRootSchema, + schema=Schemas.compositionAtRoot, explode=True, ), api_client.QueryParameter( name="compositionInProperty", style=api_client.ParameterStyle.FORM, - schema=Schemas.CompositionInPropertySchema, + schema=Schemas.compositionInProperty, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py index c8b5db736da..28dcbfceb2a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.py @@ -33,7 +33,7 @@ class RequestQueryParameters: class Schemas: - class MapBeanSchema( + class mapBean( schemas.DictSchema ): @@ -73,7 +73,7 @@ def __new__( 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': + ) -> 'mapBean': return super().__new__( cls, *args, @@ -91,7 +91,7 @@ def __new__( OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.MapBeanSchema, dict, frozendict.frozendict, ], + 'mapBean': typing.Union[Schemas.mapBean, dict, frozendict.frozendict, ], }, total=False ) @@ -105,7 +105,7 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="mapBean", style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.MapBeanSchema, + schema=Schemas.mapBean, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi index d5256ae2579..060db024e93 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/__init__.pyi @@ -32,7 +32,7 @@ class RequestQueryParameters: class Schemas: - class MapBeanSchema( + class mapBean( schemas.DictSchema ): @@ -72,7 +72,7 @@ class RequestQueryParameters: 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': + ) -> 'mapBean': return super().__new__( cls, *args, @@ -90,7 +90,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.MapBeanSchema, dict, frozendict.frozendict, ], + 'mapBean': typing.Union[Schemas.mapBean, dict, frozendict.frozendict, ], }, total=False ) @@ -104,7 +104,7 @@ class RequestQueryParameters: api_client.QueryParameter( name="mapBean", style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.MapBeanSchema, + schema=Schemas.mapBean, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py index f7c9fbdab0d..1a4b068d367 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.py @@ -32,11 +32,11 @@ class RequestQueryParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - AbSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + Ab = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -47,11 +47,11 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'Ab': typing.Union[Schemas.AbSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'Ab': typing.Union[Schemas.Ab, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], }, total=False ) @@ -65,41 +65,41 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=Schemas.Model1Schema, + schema=Schemas._1, explode=True, ), api_client.QueryParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.aB, explode=True, ), api_client.QueryParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=Schemas.AbSchema, + schema=Schemas.Ab, explode=True, ), api_client.QueryParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, explode=True, ), api_client.QueryParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.a_b, explode=True, ), ] class RequestHeaderParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -110,10 +110,10 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], }, total=False ) @@ -127,42 +127,42 @@ class Params(RequiredParams, OptionalParams): api_client.HeaderParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.Model1Schema, + schema=Schemas._1, ), api_client.HeaderParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.aB, ), api_client.HeaderParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, ), api_client.HeaderParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.a_b, ), ] class RequestPathParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - AbSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + Ab = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'Ab': typing.Union[Schemas.AbSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'Ab': typing.Union[Schemas.Ab, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -181,42 +181,42 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.Model1Schema, + schema=Schemas._1, required=True, ), api_client.PathParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.aB, required=True, ), api_client.PathParameter( name="Ab", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.AbSchema, + schema=Schemas.Ab, required=True, ), api_client.PathParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, required=True, ), api_client.PathParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.a_b, required=True, ), ] class RequestCookieParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - AbSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + Ab = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -227,11 +227,11 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'Ab': typing.Union[Schemas.AbSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'Ab': typing.Union[Schemas.Ab, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], }, total=False ) @@ -245,31 +245,31 @@ class Params(RequiredParams, OptionalParams): api_client.CookieParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=Schemas.Model1Schema, + schema=Schemas._1, explode=True, ), api_client.CookieParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.aB, explode=True, ), api_client.CookieParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=Schemas.AbSchema, + schema=Schemas.Ab, explode=True, ), api_client.CookieParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, explode=True, ), api_client.CookieParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.a_b, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi index 66f11bd8f7d..dd9f036348f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/__init__.pyi @@ -31,11 +31,11 @@ from . import response_for_200 class RequestQueryParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - AbSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + Ab = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -46,11 +46,11 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'Ab': typing.Union[Schemas.AbSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'Ab': typing.Union[Schemas.Ab, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], }, total=False ) @@ -64,41 +64,41 @@ class RequestQueryParameters: api_client.QueryParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=Schemas.Model1Schema, + schema=Schemas._1, explode=True, ), api_client.QueryParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.aB, explode=True, ), api_client.QueryParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=Schemas.AbSchema, + schema=Schemas.Ab, explode=True, ), api_client.QueryParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, explode=True, ), api_client.QueryParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.a_b, explode=True, ), ] class RequestHeaderParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -109,10 +109,10 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], }, total=False ) @@ -126,42 +126,42 @@ class RequestHeaderParameters: api_client.HeaderParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.Model1Schema, + schema=Schemas._1, ), api_client.HeaderParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.aB, ), api_client.HeaderParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, ), api_client.HeaderParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.a_b, ), ] class RequestPathParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - AbSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + Ab = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'Ab': typing.Union[Schemas.AbSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'Ab': typing.Union[Schemas.Ab, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -180,42 +180,42 @@ class RequestPathParameters: api_client.PathParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.Model1Schema, + schema=Schemas._1, required=True, ), api_client.PathParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.aB, required=True, ), api_client.PathParameter( name="Ab", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.AbSchema, + schema=Schemas.Ab, required=True, ), api_client.PathParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, required=True, ), api_client.PathParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ABSchema, + schema=Schemas.a_b, required=True, ), ] class RequestCookieParameters: class Schemas: - Model1Schema = schemas.StrSchema - ABSchema = schemas.StrSchema - AbSchema = schemas.StrSchema - ModelSelfSchema = schemas.StrSchema - ABSchema = schemas.StrSchema + _1 = schemas.StrSchema + aB = schemas.StrSchema + Ab = schemas.StrSchema + _self = schemas.StrSchema + a_b = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -226,11 +226,11 @@ class RequestCookieParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[Schemas.Model1Schema, str, ], - 'aB': typing.Union[Schemas.ABSchema, str, ], - 'Ab': typing.Union[Schemas.AbSchema, str, ], - 'self': typing.Union[Schemas.ModelSelfSchema, str, ], - 'A-B': typing.Union[Schemas.ABSchema, str, ], + '1': typing.Union[Schemas._1, str, ], + 'aB': typing.Union[Schemas.aB, str, ], + 'Ab': typing.Union[Schemas.Ab, str, ], + 'self': typing.Union[Schemas._self, str, ], + 'A-B': typing.Union[Schemas.a_b, str, ], }, total=False ) @@ -244,31 +244,31 @@ class RequestCookieParameters: api_client.CookieParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=Schemas.Model1Schema, + schema=Schemas._1, explode=True, ), api_client.CookieParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.aB, explode=True, ), api_client.CookieParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=Schemas.AbSchema, + schema=Schemas.Ab, explode=True, ), api_client.CookieParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=Schemas.ModelSelfSchema, + schema=Schemas._self, explode=True, ), api_client.CookieParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=Schemas.ABSchema, + schema=Schemas.a_b, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py index 29a7e548352..b0731015f8d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py @@ -32,13 +32,13 @@ class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,7 +57,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.pyi index 4a3ab612f40..663e77bf699 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.pyi @@ -31,13 +31,13 @@ from . import response_for_200 class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,7 +56,7 @@ class RequestPathParameters: api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py index 38a002557c1..46e416ef744 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py @@ -33,7 +33,7 @@ class RequestQueryParameters: class Schemas: - MapBeanSchema = Foo + mapBean = Foo RequiredParams = typing_extensions.TypedDict( @@ -44,7 +44,7 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.MapBeanSchema, ], + 'mapBean': typing.Union[Schemas.mapBean, ], }, total=False ) @@ -58,7 +58,7 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="mapBean", style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.MapBeanSchema, + schema=Schemas.mapBean, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.pyi index db270cc2235..8ab64a9ead2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/__init__.pyi @@ -32,7 +32,7 @@ from . import response_for_200 class RequestQueryParameters: class Schemas: - MapBeanSchema = Foo + mapBean = Foo RequiredParams = typing_extensions.TypedDict( @@ -43,7 +43,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.MapBeanSchema, ], + 'mapBean': typing.Union[Schemas.mapBean, ], }, total=False ) @@ -57,7 +57,7 @@ class RequestQueryParameters: api_client.QueryParameter( name="mapBean", style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.MapBeanSchema, + schema=Schemas.mapBean, explode=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py index ffcd42d9469..d5f29a0df83 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.py @@ -35,7 +35,7 @@ class RequestQueryParameters: class Schemas: - class PipeSchema( + class pipe( schemas.ListSchema ): @@ -47,7 +47,7 @@ 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': + ) -> 'pipe': return super().__new__( cls, arg, @@ -58,7 +58,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - class IoutilSchema( + class ioutil( schemas.ListSchema ): @@ -70,7 +70,7 @@ 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': + ) -> 'ioutil': return super().__new__( cls, arg, @@ -81,7 +81,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - class HttpSchema( + class http( schemas.ListSchema ): @@ -93,7 +93,7 @@ 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': + ) -> 'http': return super().__new__( cls, arg, @@ -104,7 +104,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - class UrlSchema( + class url( schemas.ListSchema ): @@ -116,7 +116,7 @@ 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': + ) -> 'url': return super().__new__( cls, arg, @@ -127,7 +127,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - class ContextSchema( + class context( schemas.ListSchema ): @@ -139,7 +139,7 @@ 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': + ) -> 'context': return super().__new__( cls, arg, @@ -148,18 +148,18 @@ def __new__( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - RefParamSchema = StringWithValidation + refParam = StringWithValidation RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'pipe': typing.Union[Schemas.PipeSchema, list, tuple, ], - 'ioutil': typing.Union[Schemas.IoutilSchema, list, tuple, ], - 'http': typing.Union[Schemas.HttpSchema, list, tuple, ], - 'url': typing.Union[Schemas.UrlSchema, list, tuple, ], - 'context': typing.Union[Schemas.ContextSchema, list, tuple, ], - 'refParam': typing.Union[Schemas.RefParamSchema, ], + 'pipe': typing.Union[Schemas.pipe, list, tuple, ], + 'ioutil': typing.Union[Schemas.ioutil, list, tuple, ], + 'http': typing.Union[Schemas.http, list, tuple, ], + 'url': typing.Union[Schemas.url, list, tuple, ], + 'context': typing.Union[Schemas.context, list, tuple, ], + 'refParam': typing.Union[Schemas.refParam, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -178,39 +178,39 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="pipe", style=api_client.ParameterStyle.FORM, - schema=Schemas.PipeSchema, + schema=Schemas.pipe, required=True, explode=True, ), api_client.QueryParameter( name="ioutil", style=api_client.ParameterStyle.FORM, - schema=Schemas.IoutilSchema, + schema=Schemas.ioutil, required=True, ), api_client.QueryParameter( name="http", style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=Schemas.HttpSchema, + schema=Schemas.http, required=True, ), api_client.QueryParameter( name="url", style=api_client.ParameterStyle.FORM, - schema=Schemas.UrlSchema, + schema=Schemas.url, required=True, ), api_client.QueryParameter( name="context", style=api_client.ParameterStyle.FORM, - schema=Schemas.ContextSchema, + schema=Schemas.context, required=True, explode=True, ), api_client.QueryParameter( name="refParam", style=api_client.ParameterStyle.FORM, - schema=Schemas.RefParamSchema, + schema=Schemas.refParam, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi index fc5451fed6f..b9eec8a5a51 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/__init__.pyi @@ -34,7 +34,7 @@ class RequestQueryParameters: class Schemas: - class PipeSchema( + class pipe( schemas.ListSchema ): @@ -46,7 +46,7 @@ class RequestQueryParameters: 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': + ) -> 'pipe': return super().__new__( cls, arg, @@ -57,7 +57,7 @@ class RequestQueryParameters: return super().__getitem__(i) - class IoutilSchema( + class ioutil( schemas.ListSchema ): @@ -69,7 +69,7 @@ class RequestQueryParameters: 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': + ) -> 'ioutil': return super().__new__( cls, arg, @@ -80,7 +80,7 @@ class RequestQueryParameters: return super().__getitem__(i) - class HttpSchema( + class http( schemas.ListSchema ): @@ -92,7 +92,7 @@ class RequestQueryParameters: 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': + ) -> 'http': return super().__new__( cls, arg, @@ -103,7 +103,7 @@ class RequestQueryParameters: return super().__getitem__(i) - class UrlSchema( + class url( schemas.ListSchema ): @@ -115,7 +115,7 @@ class RequestQueryParameters: 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': + ) -> 'url': return super().__new__( cls, arg, @@ -126,7 +126,7 @@ class RequestQueryParameters: return super().__getitem__(i) - class ContextSchema( + class context( schemas.ListSchema ): @@ -138,7 +138,7 @@ class RequestQueryParameters: 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': + ) -> 'context': return super().__new__( cls, arg, @@ -147,18 +147,18 @@ class RequestQueryParameters: def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - RefParamSchema = StringWithValidation + refParam = StringWithValidation RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'pipe': typing.Union[Schemas.PipeSchema, list, tuple, ], - 'ioutil': typing.Union[Schemas.IoutilSchema, list, tuple, ], - 'http': typing.Union[Schemas.HttpSchema, list, tuple, ], - 'url': typing.Union[Schemas.UrlSchema, list, tuple, ], - 'context': typing.Union[Schemas.ContextSchema, list, tuple, ], - 'refParam': typing.Union[Schemas.RefParamSchema, ], + 'pipe': typing.Union[Schemas.pipe, list, tuple, ], + 'ioutil': typing.Union[Schemas.ioutil, list, tuple, ], + 'http': typing.Union[Schemas.http, list, tuple, ], + 'url': typing.Union[Schemas.url, list, tuple, ], + 'context': typing.Union[Schemas.context, list, tuple, ], + 'refParam': typing.Union[Schemas.refParam, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -177,39 +177,39 @@ class RequestQueryParameters: api_client.QueryParameter( name="pipe", style=api_client.ParameterStyle.FORM, - schema=Schemas.PipeSchema, + schema=Schemas.pipe, required=True, explode=True, ), api_client.QueryParameter( name="ioutil", style=api_client.ParameterStyle.FORM, - schema=Schemas.IoutilSchema, + schema=Schemas.ioutil, required=True, ), api_client.QueryParameter( name="http", style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=Schemas.HttpSchema, + schema=Schemas.http, required=True, ), api_client.QueryParameter( name="url", style=api_client.ParameterStyle.FORM, - schema=Schemas.UrlSchema, + schema=Schemas.url, required=True, ), api_client.QueryParameter( name="context", style=api_client.ParameterStyle.FORM, - schema=Schemas.ContextSchema, + schema=Schemas.context, required=True, explode=True, ), api_client.QueryParameter( name="refParam", style=api_client.ParameterStyle.FORM, - schema=Schemas.RefParamSchema, + schema=Schemas.refParam, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py index f3c9f4801a3..a847042f618 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.py @@ -35,7 +35,7 @@ class RequestQueryParameters: class Schemas: - class StatusSchema( + class status( schemas.ListSchema ): @@ -72,7 +72,7 @@ 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': + ) -> 'status': return super().__new__( cls, arg, @@ -86,7 +86,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'status': typing.Union[Schemas.StatusSchema, list, tuple, ], + 'status': typing.Union[Schemas.status, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -105,7 +105,7 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="status", style=api_client.ParameterStyle.FORM, - schema=Schemas.StatusSchema, + schema=Schemas.status, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi index 73cf13573ea..5e51f87a486 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/__init__.pyi @@ -34,7 +34,7 @@ class RequestQueryParameters: class Schemas: - class StatusSchema( + class status( schemas.ListSchema ): @@ -63,7 +63,7 @@ class RequestQueryParameters: 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': + ) -> 'status': return super().__new__( cls, arg, @@ -77,7 +77,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'status': typing.Union[Schemas.StatusSchema, list, tuple, ], + 'status': typing.Union[Schemas.status, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -96,7 +96,7 @@ class RequestQueryParameters: api_client.QueryParameter( name="status", style=api_client.ParameterStyle.FORM, - schema=Schemas.StatusSchema, + schema=Schemas.status, required=True, ), ]_all_accept_content_types = ( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py index 4f759682a41..592eb6fd455 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.py @@ -35,7 +35,7 @@ class RequestQueryParameters: class Schemas: - class TagsSchema( + class tags( schemas.ListSchema ): @@ -47,7 +47,7 @@ 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': + ) -> 'tags': return super().__new__( cls, arg, @@ -61,7 +61,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'tags': typing.Union[Schemas.TagsSchema, list, tuple, ], + 'tags': typing.Union[Schemas.tags, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -80,7 +80,7 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="tags", style=api_client.ParameterStyle.FORM, - schema=Schemas.TagsSchema, + schema=Schemas.tags, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi index b9176cbcf40..9d9fadab4ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/__init__.pyi @@ -34,7 +34,7 @@ class RequestQueryParameters: class Schemas: - class TagsSchema( + class tags( schemas.ListSchema ): @@ -46,7 +46,7 @@ class RequestQueryParameters: 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': + ) -> 'tags': return super().__new__( cls, arg, @@ -60,7 +60,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'tags': typing.Union[Schemas.TagsSchema, list, tuple, ], + 'tags': typing.Union[Schemas.tags, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -79,7 +79,7 @@ class RequestQueryParameters: api_client.QueryParameter( name="tags", style=api_client.ParameterStyle.FORM, - schema=Schemas.TagsSchema, + schema=Schemas.tags, required=True, ), ]_all_accept_content_types = ( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.py index a4b139bc3a1..ae9794781ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.py @@ -32,7 +32,7 @@ class RequestHeaderParameters: class Schemas: - ApiKeySchema = schemas.StrSchema + api_key = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -43,7 +43,7 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[Schemas.ApiKeySchema, str, ], + 'api_key': typing.Union[Schemas.api_key, str, ], }, total=False ) @@ -57,19 +57,19 @@ class Params(RequiredParams, OptionalParams): api_client.HeaderParameter( name="api_key", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ApiKeySchema, + schema=Schemas.api_key, ), ] class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -88,7 +88,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.pyi index e9b87bf0a47..f241c02c509 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/__init__.pyi @@ -31,7 +31,7 @@ from . import response_for_400 class RequestHeaderParameters: class Schemas: - ApiKeySchema = schemas.StrSchema + api_key = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( @@ -42,7 +42,7 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[Schemas.ApiKeySchema, str, ], + 'api_key': typing.Union[Schemas.api_key, str, ], }, total=False ) @@ -56,19 +56,19 @@ class RequestHeaderParameters: api_client.HeaderParameter( name="api_key", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.ApiKeySchema, + schema=Schemas.api_key, ), ] class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -87,7 +87,7 @@ class RequestPathParameters: api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.py index d3c837709bc..df4f58cef30 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.py @@ -34,13 +34,13 @@ class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,7 +59,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.pyi index 914125f614b..6fcd25ff950 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/__init__.pyi @@ -33,13 +33,13 @@ from . import response_for_404 class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -58,7 +58,7 @@ class RequestPathParameters: api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ]_all_accept_content_types = ( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py index bcf670f5c8f..d71f45b596c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py @@ -32,13 +32,13 @@ class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,7 +57,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi index 7aa82c5a33f..a411ed2af72 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi @@ -31,13 +31,13 @@ from . import response_for_405 class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,7 +56,7 @@ class RequestPathParameters: api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py index 2ca5f36bbb4..6769678ad3c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py @@ -32,13 +32,13 @@ class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,7 +57,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.pyi index dc3a232ae14..d9b6f1e5bfd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.pyi @@ -31,13 +31,13 @@ from . import response_for_200 class RequestPathParameters: class Schemas: - PetIdSchema = schemas.Int64Schema + petId = schemas.Int64Schema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.PetIdSchema, decimal.Decimal, int, ], + 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,7 +56,7 @@ class RequestPathParameters: api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.PetIdSchema, + schema=Schemas.petId, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.py index 7c3ec74dc38..e35fcccd09e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.py @@ -32,13 +32,13 @@ class RequestPathParameters: class Schemas: - OrderIdSchema = schemas.StrSchema + order_id = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.OrderIdSchema, str, ], + 'order_id': typing.Union[Schemas.order_id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,7 +57,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.OrderIdSchema, + schema=Schemas.order_id, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.pyi index 80e6688962e..4f968fe2616 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/__init__.pyi @@ -31,13 +31,13 @@ from . import response_for_404 class RequestPathParameters: class Schemas: - OrderIdSchema = schemas.StrSchema + order_id = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.OrderIdSchema, str, ], + 'order_id': typing.Union[Schemas.order_id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,7 +56,7 @@ class RequestPathParameters: api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.OrderIdSchema, + schema=Schemas.order_id, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.py index fd45ee5bfcc..802d11d36b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.py @@ -36,7 +36,7 @@ class RequestPathParameters: class Schemas: - class OrderIdSchema( + class order_id( schemas.Int64Schema ): @@ -50,7 +50,7 @@ class MetaOapg: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.OrderIdSchema, decimal.Decimal, int, ], + 'order_id': typing.Union[Schemas.order_id, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -69,7 +69,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.OrderIdSchema, + schema=Schemas.order_id, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.pyi index e6e9c691e7f..2960f72b98c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/__init__.pyi @@ -35,7 +35,7 @@ class RequestPathParameters: class Schemas: - class OrderIdSchema( + class order_id( schemas.Int64Schema ): pass @@ -44,7 +44,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.OrderIdSchema, decimal.Decimal, int, ], + 'order_id': typing.Union[Schemas.order_id, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -63,7 +63,7 @@ class RequestPathParameters: api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.OrderIdSchema, + schema=Schemas.order_id, required=True, ), ]_all_accept_content_types = ( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.py index 449d66962ae..720acdca5aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.py @@ -33,15 +33,15 @@ class RequestQueryParameters: class Schemas: - UsernameSchema = schemas.StrSchema - PasswordSchema = schemas.StrSchema + username = schemas.StrSchema + password = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], - 'password': typing.Union[Schemas.PasswordSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], + 'password': typing.Union[Schemas.password, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -60,14 +60,14 @@ class Params(RequiredParams, OptionalParams): api_client.QueryParameter( name="username", style=api_client.ParameterStyle.FORM, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, explode=True, ), api_client.QueryParameter( name="password", style=api_client.ParameterStyle.FORM, - schema=Schemas.PasswordSchema, + schema=Schemas.password, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.pyi index 34fd0255e02..7bcf78abb8c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/__init__.pyi @@ -32,15 +32,15 @@ from . import response_for_400 class RequestQueryParameters: class Schemas: - UsernameSchema = schemas.StrSchema - PasswordSchema = schemas.StrSchema + username = schemas.StrSchema + password = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], - 'password': typing.Union[Schemas.PasswordSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], + 'password': typing.Union[Schemas.password, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,14 +59,14 @@ class RequestQueryParameters: api_client.QueryParameter( name="username", style=api_client.ParameterStyle.FORM, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, explode=True, ), api_client.QueryParameter( name="password", style=api_client.ParameterStyle.FORM, - schema=Schemas.PasswordSchema, + schema=Schemas.password, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py index 87460fe0b5b..7adff45441c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py @@ -18,8 +18,8 @@ class Header: class Schemas: - XRateLimitSchema = schemas.Int32Schema - XExpiresAfterSchema = schemas.DateTimeSchema + x_rate_limit = schemas.Int32Schema + x_expires_after = schemas.DateTimeSchema RequiredParams = typing_extensions.TypedDict( @@ -30,8 +30,8 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'X-Rate-Limit': typing.Union[Schemas.XRateLimitSchema, decimal.Decimal, int, ], - 'X-Expires-After': typing.Union[Schemas.XExpiresAfterSchema, str, datetime, ], + 'X-Rate-Limit': typing.Union[Schemas.x_rate_limit, decimal.Decimal, int, ], + 'X-Expires-After': typing.Union[Schemas.x_expires_after, str, datetime, ], }, total=False ) @@ -45,12 +45,12 @@ class Params(RequiredParams, OptionalParams): api_client.HeaderParameter( name="X-Rate-Limit", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.XRateLimitSchema, + schema=Schemas.x_rate_limit, ), api_client.HeaderParameter( name="X-Expires-After", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.XExpiresAfterSchema, + schema=Schemas.x_expires_after, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.py index 039b88deac0..fda577bc54e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.py @@ -32,13 +32,13 @@ class RequestPathParameters: class Schemas: - UsernameSchema = schemas.StrSchema + username = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,7 +57,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.pyi index ab944a44bcb..bc2c0644c36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/__init__.pyi @@ -31,13 +31,13 @@ from . import response_for_404 class RequestPathParameters: class Schemas: - UsernameSchema = schemas.StrSchema + username = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,7 +56,7 @@ class RequestPathParameters: api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.py index ffd9d78d37b..0e25b8c2ff7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.py @@ -34,13 +34,13 @@ class RequestPathParameters: class Schemas: - UsernameSchema = schemas.StrSchema + username = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,7 +59,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.pyi index 2a2dcf71462..f982869ce5e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/__init__.pyi @@ -33,13 +33,13 @@ from . import response_for_404 class RequestPathParameters: class Schemas: - UsernameSchema = schemas.StrSchema + username = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -58,7 +58,7 @@ class RequestPathParameters: api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, ), ]_all_accept_content_types = ( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.py index 0c52820ac8e..9be3b653934 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.py @@ -35,13 +35,13 @@ class RequestPathParameters: class Schemas: - UsernameSchema = schemas.StrSchema + username = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -60,7 +60,7 @@ class Params(RequiredParams, OptionalParams): api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, ), ] diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.pyi index 9a8d4c152ba..0d42a4b931e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/__init__.pyi @@ -34,13 +34,13 @@ from . import response_for_404 class RequestPathParameters: class Schemas: - UsernameSchema = schemas.StrSchema + username = schemas.StrSchema RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.UsernameSchema, str, ], + 'username': typing.Union[Schemas.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,7 +59,7 @@ class RequestPathParameters: api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.UsernameSchema, + schema=Schemas.username, required=True, ), ] From 758d15e83b70fb14bdd8ab18cb7b5299d963427c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 12 Oct 2022 13:00:21 -0700 Subject: [PATCH 3/7] Updates header_params --- .../main/resources/python/api_doc.handlebars | 10 ++-- .../petstore/python/docs/apis/tags/FakeApi.md | 50 +++++++++---------- .../petstore/python/docs/apis/tags/PetApi.md | 10 ++-- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars index 12196bf9100..00e9c4febcd 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars @@ -55,7 +55,7 @@ Name | Type | Description | Notes [query_params](#{{operationId}}.RequestQueryParameters) | [RequestQueryParameters.Params](#{{operationId}}.RequestQueryParameters.Params) | | {{/if}} {{#if headerParams}} -header_params | RequestHeaderParameters.Params | | +[header_params](#{{operationId}}.RequestHeaderParameters) | [RequestHeaderParameters.Params](#{{operationId}}.RequestHeaderParameters.Params) | | {{/if}} {{#if pathParams}} path_params | RequestPathParameters.Params | | @@ -107,17 +107,17 @@ Name | Type | Description | Notes {{/if}} {{#if headerParams}} -### header_params -#### RequestHeaderParameters.Params +### header_params +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each headerParams}} -{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} +{{baseName}} | {{#with schema}}[RequestHeaderParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestHeaderParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} {{/each}} {{#each headerParams}} {{#with schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestHeaderParameters.Schemas." complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index 28903497797..7bdd2dafda6 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -1076,7 +1076,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [body](#enum_parameters.RequestBody) | typing.Union[[RequestBody.Schemas.application_x_www_form_urlencoded](#enum_parameters.RequestBody.Schemas.application_x_www_form_urlencoded), Unset] | optional, default is unset | [query_params](#enum_parameters.RequestQueryParameters) | [RequestQueryParameters.Params](#enum_parameters.RequestQueryParameters.Params) | | -header_params | RequestHeaderParameters.Params | | +[header_params](#enum_parameters.RequestHeaderParameters) | [RequestHeaderParameters.Params](#enum_parameters.RequestHeaderParameters.Params) | | 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 @@ -1156,15 +1156,15 @@ 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 -#### RequestHeaderParameters.Params +### header_params +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -enum_header_string_array | enum_header_string_array | | optional -enum_header_string | enum_header_string | | optional +enum_header_string_array | [RequestHeaderParameters.Schemas.enum_header_string_array](#enum_parameters.RequestHeaderParameters.Schemas.enum_header_string_array) | | optional +enum_header_string | [RequestHeaderParameters.Schemas.enum_header_string](#enum_parameters.RequestHeaderParameters.Schemas.enum_header_string) | | optional -# enum_header_string_array +# RequestHeaderParameters.Schemas.enum_header_string_array ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1176,7 +1176,7 @@ 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 "$" -# enum_header_string +# RequestHeaderParameters.Schemas.enum_header_string ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1346,7 +1346,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [query_params](#group_parameters.RequestQueryParameters) | [RequestQueryParameters.Params](#group_parameters.RequestQueryParameters.Params) | | -header_params | RequestHeaderParameters.Params | | +[header_params](#group_parameters.RequestHeaderParameters) | [RequestHeaderParameters.Params](#group_parameters.RequestHeaderParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -1390,22 +1390,22 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer -### header_params -#### RequestHeaderParameters.Params +### header_params +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -required_boolean_group | required_boolean_group | | -boolean_group | boolean_group | | optional +required_boolean_group | [RequestHeaderParameters.Schemas.required_boolean_group](#group_parameters.RequestHeaderParameters.Schemas.required_boolean_group) | | +boolean_group | [RequestHeaderParameters.Schemas.boolean_group](#group_parameters.RequestHeaderParameters.Schemas.boolean_group) | | optional -# required_boolean_group +# RequestHeaderParameters.Schemas.required_boolean_group ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | -# boolean_group +# RequestHeaderParameters.Schemas.boolean_group ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2415,7 +2415,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [body](#parameter_collisions.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#parameter_collisions.RequestBody.Schemas.application_json), Unset] | optional, default is unset | [query_params](#parameter_collisions.RequestQueryParameters) | [RequestQueryParameters.Params](#parameter_collisions.RequestQueryParameters.Params) | | -header_params | RequestHeaderParameters.Params | | +[header_params](#parameter_collisions.RequestHeaderParameters) | [RequestHeaderParameters.Params](#parameter_collisions.RequestHeaderParameters.Params) | | path_params | RequestPathParameters.Params | | cookie_params | RequestCookieParameters.Params | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body @@ -2480,38 +2480,38 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -### header_params -#### RequestHeaderParameters.Params +### header_params +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | 1 | | optional -aB | aB | | optional -self | self | | optional -A-B | A-B | | optional +1 | [RequestHeaderParameters.Schemas._1](#parameter_collisions.RequestHeaderParameters.Schemas._1) | | optional +aB | [RequestHeaderParameters.Schemas.aB](#parameter_collisions.RequestHeaderParameters.Schemas.aB) | | optional +self | [RequestHeaderParameters.Schemas._self](#parameter_collisions.RequestHeaderParameters.Schemas._self) | | optional +A-B | [RequestHeaderParameters.Schemas.a_b](#parameter_collisions.RequestHeaderParameters.Schemas.a_b) | | optional -# 1 +# RequestHeaderParameters.Schemas._1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# aB +# RequestHeaderParameters.Schemas.aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# self +# RequestHeaderParameters.Schemas._self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# A-B +# RequestHeaderParameters.Schemas.a_b ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md index 7ffc2a7993f..6ae769b6395 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -259,20 +259,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -header_params | RequestHeaderParameters.Params | | +[header_params](#delete_pet.RequestHeaderParameters) | [RequestHeaderParameters.Params](#delete_pet.RequestHeaderParameters.Params) | | path_params | RequestPathParameters.Params | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 -#### RequestHeaderParameters.Params +### header_params +#### RequestHeaderParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -api_key | api_key | | optional +api_key | [RequestHeaderParameters.Schemas.api_key](#delete_pet.RequestHeaderParameters.Schemas.api_key) | | optional -# api_key +# RequestHeaderParameters.Schemas.api_key ## Model Type Info Input Type | Accessed Type | Description | Notes From 81d7fdc6dc4c64b36f2ba9ab9de907978cebced9 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 12 Oct 2022 13:13:38 -0700 Subject: [PATCH 4/7] Updates path_parameters --- .../main/resources/python/api_doc.handlebars | 10 ++-- .../petstore/python/docs/apis/tags/FakeApi.md | 36 ++++++------- .../petstore/python/docs/apis/tags/PetApi.md | 50 +++++++++---------- .../python/docs/apis/tags/StoreApi.md | 20 ++++---- .../petstore/python/docs/apis/tags/UserApi.md | 30 +++++------ 5 files changed, 73 insertions(+), 73 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars index 00e9c4febcd..3c6fa6cfc7f 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars @@ -58,7 +58,7 @@ Name | Type | Description | Notes [header_params](#{{operationId}}.RequestHeaderParameters) | [RequestHeaderParameters.Params](#{{operationId}}.RequestHeaderParameters.Params) | | {{/if}} {{#if pathParams}} -path_params | RequestPathParameters.Params | | +[path_params](#{{operationId}}.RequestPathParameters) | [RequestPathParameters.Params](#{{operationId}}.RequestPathParameters.Params) | | {{/if}} {{#if cookieParams}} cookie_params | RequestCookieParameters.Params | | @@ -123,17 +123,17 @@ Name | Type | Description | Notes {{/if}} {{#if pathParams}} -### path_params -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each pathParams}} -{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} +{{baseName}} | {{#with schema}}[RequestPathParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestPathParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} {{/each}} {{#each pathParams}} {{#with schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestPathParameters.Schemas." complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index 7bdd2dafda6..517bfdf1518 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -842,19 +842,19 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParameters.Params | | +[path_params](#delete_coffee.RequestPathParameters) | [RequestPathParameters.Params](#delete_coffee.RequestPathParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -id | id | | +id | [RequestPathParameters.Schemas.id](#delete_coffee.RequestPathParameters.Schemas.id) | | -# id +# RequestPathParameters.Schemas.id ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2416,7 +2416,7 @@ Name | Type | Description | Notes [body](#parameter_collisions.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#parameter_collisions.RequestBody.Schemas.application_json), Unset] | optional, default is unset | [query_params](#parameter_collisions.RequestQueryParameters) | [RequestQueryParameters.Params](#parameter_collisions.RequestQueryParameters.Params) | | [header_params](#parameter_collisions.RequestHeaderParameters) | [RequestHeaderParameters.Params](#parameter_collisions.RequestHeaderParameters.Params) | | -path_params | RequestPathParameters.Params | | +[path_params](#parameter_collisions.RequestPathParameters) | [RequestPathParameters.Params](#parameter_collisions.RequestPathParameters.Params) | | cookie_params | RequestCookieParameters.Params | | 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 @@ -2518,46 +2518,46 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -### path_params -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | 1 | | -aB | aB | | -Ab | Ab | | -self | self | | -A-B | A-B | | +1 | [RequestPathParameters.Schemas._1](#parameter_collisions.RequestPathParameters.Schemas._1) | | +aB | [RequestPathParameters.Schemas.aB](#parameter_collisions.RequestPathParameters.Schemas.aB) | | +Ab | [RequestPathParameters.Schemas.Ab](#parameter_collisions.RequestPathParameters.Schemas.Ab) | | +self | [RequestPathParameters.Schemas._self](#parameter_collisions.RequestPathParameters.Schemas._self) | | +A-B | [RequestPathParameters.Schemas.a_b](#parameter_collisions.RequestPathParameters.Schemas.a_b) | | -# 1 +# RequestPathParameters.Schemas._1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# aB +# RequestPathParameters.Schemas.aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# Ab +# RequestPathParameters.Schemas.Ab ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# self +# RequestPathParameters.Schemas._self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# A-B +# RequestPathParameters.Schemas.a_b ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md index 6ae769b6395..8b39d7f9b0c 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -260,7 +260,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [header_params](#delete_pet.RequestHeaderParameters) | [RequestHeaderParameters.Params](#delete_pet.RequestHeaderParameters.Params) | | -path_params | RequestPathParameters.Params | | +[path_params](#delete_pet.RequestPathParameters) | [RequestPathParameters.Params](#delete_pet.RequestPathParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -279,14 +279,14 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -### path_params -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | petId | | +petId | [RequestPathParameters.Schemas.petId](#delete_pet.RequestPathParameters.Schemas.petId) | | -# petId +# RequestPathParameters.Schemas.petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -749,20 +749,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParameters.Params | | +[path_params](#get_pet_by_id.RequestPathParameters) | [RequestPathParameters.Params](#get_pet_by_id.RequestPathParameters.Params) | | 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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | petId | | +petId | [RequestPathParameters.Schemas.petId](#get_pet_by_id.RequestPathParameters.Schemas.petId) | | -# petId +# RequestPathParameters.Schemas.petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1066,7 +1066,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [body](#update_pet_with_form.RequestBody) | typing.Union[[RequestBody.Schemas.application_x_www_form_urlencoded](#update_pet_with_form.RequestBody.Schemas.application_x_www_form_urlencoded), Unset] | optional, default is unset | -path_params | RequestPathParameters.Params | | +[path_params](#update_pet_with_form.RequestPathParameters) | [RequestPathParameters.Params](#update_pet_with_form.RequestPathParameters.Params) | | 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 @@ -1088,14 +1088,14 @@ Key | Input Type | Accessed Type | Description | Notes **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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | petId | | +petId | [RequestPathParameters.Schemas.petId](#update_pet_with_form.RequestPathParameters.Schemas.petId) | | -# petId +# RequestPathParameters.Schemas.petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1191,7 +1191,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [body](#upload_file_with_required_file.RequestBody) | typing.Union[[RequestBody.Schemas.multipart_form_data](#upload_file_with_required_file.RequestBody.Schemas.multipart_form_data), Unset] | optional, default is unset | -path_params | RequestPathParameters.Params | | +[path_params](#upload_file_with_required_file.RequestPathParameters) | [RequestPathParameters.Params](#upload_file_with_required_file.RequestPathParameters.Params) | | 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 @@ -1214,14 +1214,14 @@ Key | Input Type | Accessed Type | Description | Notes **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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | petId | | +petId | [RequestPathParameters.Schemas.petId](#upload_file_with_required_file.RequestPathParameters.Schemas.petId) | | -# petId +# RequestPathParameters.Schemas.petId ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1323,7 +1323,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [body](#upload_image.RequestBody) | typing.Union[[RequestBody.Schemas.multipart_form_data](#upload_image.RequestBody.Schemas.multipart_form_data), Unset] | optional, default is unset | -path_params | RequestPathParameters.Params | | +[path_params](#upload_image.RequestPathParameters) | [RequestPathParameters.Params](#upload_image.RequestPathParameters.Params) | | 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 @@ -1346,14 +1346,14 @@ Key | Input Type | Accessed Type | Description | Notes **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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | petId | | +petId | [RequestPathParameters.Schemas.petId](#upload_image.RequestPathParameters.Schemas.petId) | | -# petId +# RequestPathParameters.Schemas.petId ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md index b69bab6ac6b..caec33f6ae4 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -50,19 +50,19 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParameters.Params | | +[path_params](#delete_order.RequestPathParameters) | [RequestPathParameters.Params](#delete_order.RequestPathParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | order_id | | +order_id | [RequestPathParameters.Schemas.order_id](#delete_order.RequestPathParameters.Schemas.order_id) | | -# order_id +# RequestPathParameters.Schemas.order_id ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -216,20 +216,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParameters.Params | | +[path_params](#get_order_by_id.RequestPathParameters) | [RequestPathParameters.Params](#get_order_by_id.RequestPathParameters.Params) | | 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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | order_id | | +order_id | [RequestPathParameters.Schemas.order_id](#get_order_by_id.RequestPathParameters.Schemas.order_id) | | -# order_id +# RequestPathParameters.Schemas.order_id ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md index c8ada04e7bb..1aef7609630 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -327,19 +327,19 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParameters.Params | | +[path_params](#delete_user.RequestPathParameters) | [RequestPathParameters.Params](#delete_user.RequestPathParameters.Params) | | stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client 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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | username | | +username | [RequestPathParameters.Schemas.username](#delete_user.RequestPathParameters.Schemas.username) | | -# username +# RequestPathParameters.Schemas.username ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -413,20 +413,20 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParameters.Params | | +[path_params](#get_user_by_name.RequestPathParameters) | [RequestPathParameters.Params](#get_user_by_name.RequestPathParameters.Params) | | 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 -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | username | | +username | [RequestPathParameters.Schemas.username](#get_user_by_name.RequestPathParameters.Schemas.username) | | -# username +# RequestPathParameters.Schemas.username ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -727,7 +727,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- [body](#update_user.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#update_user.RequestBody.Schemas.application_json)] | required | -path_params | RequestPathParameters.Params | | +[path_params](#update_user.RequestPathParameters) | [RequestPathParameters.Params](#update_user.RequestPathParameters.Params) | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client @@ -741,14 +741,14 @@ Type | Description | Notes [**User**](../../models/User.md) | | -### path_params -#### RequestPathParameters.Params +### path_params +#### RequestPathParameters.Params Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | username | | +username | [RequestPathParameters.Schemas.username](#update_user.RequestPathParameters.Schemas.username) | | -# username +# RequestPathParameters.Schemas.username ## Model Type Info Input Type | Accessed Type | Description | Notes From ed5693305cebac6c92fbd17cb4d67232bb407dcf Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 12 Oct 2022 13:26:06 -0700 Subject: [PATCH 5/7] Updates cookie_params, updates x_params to say key + input type --- .../main/resources/python/api_doc.handlebars | 18 +++--- .../petstore/python/docs/apis/tags/FakeApi.md | 58 +++++++++---------- .../petstore/python/docs/apis/tags/PetApi.md | 16 ++--- .../python/docs/apis/tags/StoreApi.md | 4 +- .../petstore/python/docs/apis/tags/UserApi.md | 8 +-- 5 files changed, 52 insertions(+), 52 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars index 3c6fa6cfc7f..b1141380890 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_doc.handlebars @@ -61,7 +61,7 @@ Name | Type | Description | Notes [path_params](#{{operationId}}.RequestPathParameters) | [RequestPathParameters.Params](#{{operationId}}.RequestPathParameters.Params) | | {{/if}} {{#if cookieParams}} -cookie_params | RequestCookieParameters.Params | | +[cookie_params](#{{operationId}}.RequestCookieParameters) | [RequestCookieParameters.Params](#{{operationId}}.RequestCookieParameters.Params) | | {{/if}} {{#with bodyParam}} {{#each content}} @@ -93,7 +93,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each queryParams}} {{baseName}} | {{#with schema}}[RequestQueryParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestQueryParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} @@ -110,7 +110,7 @@ Name | Type | Description | Notes ### header_params #### RequestHeaderParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each headerParams}} {{baseName}} | {{#with schema}}[RequestHeaderParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestHeaderParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} @@ -126,7 +126,7 @@ Name | Type | Description | Notes ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each pathParams}} {{baseName}} | {{#with schema}}[RequestPathParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestPathParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} @@ -139,17 +139,17 @@ Name | Type | Description | Notes {{/if}} {{#if cookieParams}} -### cookie_params -#### RequestCookieParameters.Params +### cookie_params +#### RequestCookieParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each cookieParams}} -{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} +{{baseName}} | {{#with schema}}[RequestCookieParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../../operationId}}.RequestCookieParameters.Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}){{/with}} | | {{#unless required}}optional{{/unless}} {{/each}} {{#each cookieParams}} {{#with schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestCookieParameters.Schemas." complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index 517bfdf1518..f65600a5042 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -433,7 +433,7 @@ Type | Description | Notes ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- query | [RequestQueryParameters.Schemas.query](#body_with_query_params.RequestQueryParameters.Schemas.query) | | @@ -592,7 +592,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- someVar | [RequestQueryParameters.Schemas.someVar](#case_sensitive_params.RequestQueryParameters.Schemas.someVar) | | SomeVar | [RequestQueryParameters.Schemas.SomeVar](#case_sensitive_params.RequestQueryParameters.Schemas.SomeVar) | | @@ -850,7 +850,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- id | [RequestPathParameters.Schemas.id](#delete_coffee.RequestPathParameters.Schemas.id) | | @@ -1115,7 +1115,7 @@ items | str, | str, | | must be one of [">", "$", ] if omitted the server wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- enum_query_string_array | [RequestQueryParameters.Schemas.enum_query_string_array](#enum_parameters.RequestQueryParameters.Schemas.enum_query_string_array) | | optional enum_query_string | [RequestQueryParameters.Schemas.enum_query_string](#enum_parameters.RequestQueryParameters.Schemas.enum_query_string) | | optional @@ -1159,7 +1159,7 @@ decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [1.1, -1.2 ### header_params #### RequestHeaderParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- enum_header_string_array | [RequestHeaderParameters.Schemas.enum_header_string_array](#enum_parameters.RequestHeaderParameters.Schemas.enum_header_string_array) | | optional enum_header_string | [RequestHeaderParameters.Schemas.enum_header_string](#enum_parameters.RequestHeaderParameters.Schemas.enum_header_string) | | optional @@ -1354,7 +1354,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- required_string_group | [RequestQueryParameters.Schemas.required_string_group](#group_parameters.RequestQueryParameters.Schemas.required_string_group) | | required_int64_group | [RequestQueryParameters.Schemas.required_int64_group](#group_parameters.RequestQueryParameters.Schemas.required_int64_group) | | @@ -1393,7 +1393,7 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer ### header_params #### RequestHeaderParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- required_boolean_group | [RequestHeaderParameters.Schemas.required_boolean_group](#group_parameters.RequestHeaderParameters.Schemas.required_boolean_group) | | boolean_group | [RequestHeaderParameters.Schemas.boolean_group](#group_parameters.RequestHeaderParameters.Schemas.boolean_group) | | optional @@ -1620,7 +1620,7 @@ str, | str, | | ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- compositionAtRoot | [RequestQueryParameters.Schemas.compositionAtRoot](#inline_composition.RequestQueryParameters.Schemas.compositionAtRoot) | | optional compositionInProperty | [RequestQueryParameters.Schemas.compositionInProperty](#inline_composition.RequestQueryParameters.Schemas.compositionInProperty) | | optional @@ -2198,7 +2198,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- mapBean | [RequestQueryParameters.Schemas.mapBean](#object_in_query.RequestQueryParameters.Schemas.mapBean) | | optional @@ -2417,7 +2417,7 @@ Name | Type | Description | Notes [query_params](#parameter_collisions.RequestQueryParameters) | [RequestQueryParameters.Params](#parameter_collisions.RequestQueryParameters.Params) | | [header_params](#parameter_collisions.RequestHeaderParameters) | [RequestHeaderParameters.Params](#parameter_collisions.RequestHeaderParameters.Params) | | [path_params](#parameter_collisions.RequestPathParameters) | [RequestPathParameters.Params](#parameter_collisions.RequestPathParameters.Params) | | -cookie_params | RequestCookieParameters.Params | | +[cookie_params](#parameter_collisions.RequestCookieParameters) | [RequestCookieParameters.Params](#parameter_collisions.RequestCookieParameters.Params) | | 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 @@ -2436,7 +2436,7 @@ dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- 1 | [RequestQueryParameters.Schemas._1](#parameter_collisions.RequestQueryParameters.Schemas._1) | | optional aB | [RequestQueryParameters.Schemas.aB](#parameter_collisions.RequestQueryParameters.Schemas.aB) | | optional @@ -2483,7 +2483,7 @@ str, | str, | | ### header_params #### RequestHeaderParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- 1 | [RequestHeaderParameters.Schemas._1](#parameter_collisions.RequestHeaderParameters.Schemas._1) | | optional aB | [RequestHeaderParameters.Schemas.aB](#parameter_collisions.RequestHeaderParameters.Schemas.aB) | | optional @@ -2521,7 +2521,7 @@ str, | str, | | ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- 1 | [RequestPathParameters.Schemas._1](#parameter_collisions.RequestPathParameters.Schemas._1) | | aB | [RequestPathParameters.Schemas.aB](#parameter_collisions.RequestPathParameters.Schemas.aB) | | @@ -2564,46 +2564,46 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -### cookie_params -#### RequestCookieParameters.Params +### cookie_params +#### RequestCookieParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | 1 | | optional -aB | aB | | optional -Ab | Ab | | optional -self | self | | optional -A-B | A-B | | optional +1 | [RequestCookieParameters.Schemas._1](#parameter_collisions.RequestCookieParameters.Schemas._1) | | optional +aB | [RequestCookieParameters.Schemas.aB](#parameter_collisions.RequestCookieParameters.Schemas.aB) | | optional +Ab | [RequestCookieParameters.Schemas.Ab](#parameter_collisions.RequestCookieParameters.Schemas.Ab) | | optional +self | [RequestCookieParameters.Schemas._self](#parameter_collisions.RequestCookieParameters.Schemas._self) | | optional +A-B | [RequestCookieParameters.Schemas.a_b](#parameter_collisions.RequestCookieParameters.Schemas.a_b) | | optional -# 1 +# RequestCookieParameters.Schemas._1 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# aB +# RequestCookieParameters.Schemas.aB ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# Ab +# RequestCookieParameters.Schemas.Ab ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# self +# RequestCookieParameters.Schemas._self ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# A-B +# RequestCookieParameters.Schemas.a_b ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2685,7 +2685,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- someParam | | | @@ -2779,7 +2779,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- pipe | [RequestQueryParameters.Schemas.pipe](#query_parameter_collection_format.RequestQueryParameters.Schemas.pipe) | | ioutil | [RequestQueryParameters.Schemas.ioutil](#query_parameter_collection_format.RequestQueryParameters.Schemas.ioutil) | | @@ -2924,7 +2924,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- mapBean | [RequestQueryParameters.Schemas.mapBean](#ref_object_in_query.RequestQueryParameters.Schemas.mapBean) | | optional diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md index 8b39d7f9b0c..99c7f45ca94 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -268,7 +268,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### header_params #### RequestHeaderParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- api_key | [RequestHeaderParameters.Schemas.api_key](#delete_pet.RequestHeaderParameters.Schemas.api_key) | | optional @@ -282,7 +282,7 @@ str, | str, | | ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- petId | [RequestPathParameters.Schemas.petId](#delete_pet.RequestPathParameters.Schemas.petId) | | @@ -436,7 +436,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- status | [RequestQueryParameters.Schemas.status](#find_pets_by_status.RequestQueryParameters.Schemas.status) | | @@ -628,7 +628,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- tags | [RequestQueryParameters.Schemas.tags](#find_pets_by_tags.RequestQueryParameters.Schemas.tags) | | @@ -758,7 +758,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- petId | [RequestPathParameters.Schemas.petId](#get_pet_by_id.RequestPathParameters.Schemas.petId) | | @@ -1091,7 +1091,7 @@ Key | Input Type | Accessed Type | Description | Notes ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- petId | [RequestPathParameters.Schemas.petId](#update_pet_with_form.RequestPathParameters.Schemas.petId) | | @@ -1217,7 +1217,7 @@ Key | Input Type | Accessed Type | Description | Notes ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- petId | [RequestPathParameters.Schemas.petId](#upload_file_with_required_file.RequestPathParameters.Schemas.petId) | | @@ -1349,7 +1349,7 @@ Key | Input Type | Accessed Type | Description | Notes ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- petId | [RequestPathParameters.Schemas.petId](#upload_image.RequestPathParameters.Schemas.petId) | | diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md index caec33f6ae4..c8fca2b4465 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -58,7 +58,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- order_id | [RequestPathParameters.Schemas.order_id](#delete_order.RequestPathParameters.Schemas.order_id) | | @@ -225,7 +225,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- order_id | [RequestPathParameters.Schemas.order_id](#get_order_by_id.RequestPathParameters.Schemas.order_id) | | diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md index 1aef7609630..8dad09635c9 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -335,7 +335,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | [RequestPathParameters.Schemas.username](#delete_user.RequestPathParameters.Schemas.username) | | @@ -422,7 +422,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | [RequestPathParameters.Schemas.username](#get_user_by_name.RequestPathParameters.Schemas.username) | | @@ -530,7 +530,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### query_params #### RequestQueryParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | [RequestQueryParameters.Schemas.username](#login_user.RequestQueryParameters.Schemas.username) | | password | [RequestQueryParameters.Schemas.password](#login_user.RequestQueryParameters.Schemas.password) | | @@ -744,7 +744,7 @@ Type | Description | Notes ### path_params #### RequestPathParameters.Params -Name | Type | Description | Notes +Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | [RequestPathParameters.Schemas.username](#update_user.RequestPathParameters.Schemas.username) | | From 95ef39b150dabda4d15eb75283287499ccac1232 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 12 Oct 2022 14:00:45 -0700 Subject: [PATCH 6/7] Samples updated --- .../docs/apis/tags/AdditionalPropertiesApi.md | 88 +- .../python/docs/apis/tags/AllOfApi.md | 198 +- .../python/docs/apis/tags/AnyOfApi.md | 110 +- .../docs/apis/tags/ContentTypeJsonApi.md | 1914 +++++++---------- .../python/docs/apis/tags/DefaultApi.md | 44 +- .../python/docs/apis/tags/EnumApi.md | 176 +- .../python/docs/apis/tags/FormatApi.md | 198 +- .../python/docs/apis/tags/ItemsApi.md | 22 +- .../python/docs/apis/tags/MaxItemsApi.md | 22 +- .../python/docs/apis/tags/MaxLengthApi.md | 22 +- .../python/docs/apis/tags/MaxPropertiesApi.md | 44 +- .../python/docs/apis/tags/MaximumApi.md | 44 +- .../python/docs/apis/tags/MinItemsApi.md | 22 +- .../python/docs/apis/tags/MinLengthApi.md | 22 +- .../python/docs/apis/tags/MinPropertiesApi.md | 22 +- .../python/docs/apis/tags/MinimumApi.md | 44 +- .../python/docs/apis/tags/ModelNotApi.md | 66 +- .../python/docs/apis/tags/MultipleOfApi.md | 88 +- .../python/docs/apis/tags/OneOfApi.md | 132 +- .../docs/apis/tags/OperationRequestBodyApi.md | 1044 ++++----- .../python/docs/apis/tags/PathPostApi.md | 1914 +++++++---------- .../python/docs/apis/tags/PatternApi.md | 44 +- .../python/docs/apis/tags/PropertiesApi.md | 44 +- .../python/docs/apis/tags/RefApi.md | 176 +- .../python/docs/apis/tags/RequiredApi.md | 88 +- .../ResponseContentContentTypeSchemaApi.md | 870 +++----- .../python/docs/apis/tags/TypeApi.md | 154 +- .../python/docs/apis/tags/UniqueItemsApi.md | 44 +- .../python/docs/apis/tags/DefaultApi.md | 12 +- .../python/.openapi-generator/VERSION | 2 +- 30 files changed, 3138 insertions(+), 4532 deletions(-) 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 index 5f54a790b11..e0276631c63 100644 --- 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 @@ -16,8 +16,6 @@ Method | HTTP request | Description # **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 @@ -54,15 +52,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -73,9 +71,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -90,8 +88,6 @@ No authorization required # **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 @@ -126,16 +122,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -149,8 +145,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_request_body** -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - ### Example @@ -184,15 +178,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -203,9 +197,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -220,8 +214,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - ### Example @@ -256,16 +248,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -279,8 +271,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_request_body** -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - ### Example @@ -316,15 +306,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -335,9 +325,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -352,8 +342,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - ### Example @@ -388,16 +376,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -411,8 +399,6 @@ No authorization required # **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 @@ -446,15 +432,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -465,9 +451,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -482,8 +468,6 @@ No authorization required # **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 @@ -518,16 +502,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.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 index 8b598023479..feddca2d676 100644 --- 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 @@ -26,8 +26,6 @@ Method | HTTP request | Description # **post_allof_combined_with_anyof_oneof_request_body** -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - ### Example @@ -61,15 +59,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_combined_with_anyof_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_combined_with_anyof_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -80,9 +78,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_request_body.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -97,8 +95,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_response_body_for_content_types** -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - ### Example @@ -133,16 +129,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -156,8 +152,6 @@ No authorization required # **post_allof_request_body** -> post_allof_request_body(allof) - ### Example @@ -191,15 +185,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -210,9 +204,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_request_body.response_for_200.ApiResponse) | success -#### post_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -227,8 +221,6 @@ No authorization required # **post_allof_response_body_for_content_types** -> Allof post_allof_response_body_for_content_types() - ### Example @@ -263,16 +255,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -286,8 +278,6 @@ No authorization required # **post_allof_simple_types_request_body** -> post_allof_simple_types_request_body(allof_simple_types) - ### Example @@ -321,15 +311,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_simple_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_simple_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -340,9 +330,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_request_body.response_for_200.ApiResponse) | success -#### post_allof_simple_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -357,8 +347,6 @@ No authorization required # **post_allof_simple_types_response_body_for_content_types** -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - ### Example @@ -393,16 +381,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -416,8 +404,6 @@ No authorization required # **post_allof_with_base_schema_request_body** -> post_allof_with_base_schema_request_body(allof_with_base_schema) - ### Example @@ -451,15 +437,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -470,9 +456,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -487,8 +473,6 @@ No authorization required # **post_allof_with_base_schema_response_body_for_content_types** -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - ### Example @@ -523,16 +507,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -546,8 +530,6 @@ No authorization required # **post_allof_with_one_empty_schema_request_body** -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - ### Example @@ -581,15 +563,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -600,9 +582,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -617,8 +599,6 @@ No authorization required # **post_allof_with_one_empty_schema_response_body_for_content_types** -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -653,16 +633,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -676,8 +656,6 @@ No authorization required # **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 @@ -711,15 +689,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_first_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_first_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -730,9 +708,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -747,8 +725,6 @@ No authorization required # **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 @@ -783,16 +759,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -806,8 +782,6 @@ No authorization required # **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 @@ -841,15 +815,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_last_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_last_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -860,9 +834,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -877,8 +851,6 @@ No authorization required # **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 @@ -913,16 +885,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -936,8 +908,6 @@ No authorization required # **post_allof_with_two_empty_schemas_request_body** -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - ### Example @@ -971,15 +941,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_two_empty_schemas_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_two_empty_schemas_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -990,9 +960,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1007,8 +977,6 @@ No authorization required # **post_allof_with_two_empty_schemas_response_body_for_content_types** -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - ### Example @@ -1043,16 +1011,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1066,8 +1034,6 @@ No authorization required # **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 @@ -1101,15 +1067,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -1120,9 +1086,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1137,8 +1103,6 @@ No authorization required # **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 @@ -1173,16 +1137,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.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 index e5cc8fd7c88..efcd9a6953f 100644 --- 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 @@ -18,8 +18,6 @@ Method | HTTP request | Description # **post_anyof_complex_types_request_body** -> post_anyof_complex_types_request_body(anyof_complex_types) - ### Example @@ -53,15 +51,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -72,9 +70,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -89,8 +87,6 @@ No authorization required # **post_anyof_complex_types_response_body_for_content_types** -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - ### Example @@ -125,16 +121,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -148,8 +144,6 @@ No authorization required # **post_anyof_request_body** -> post_anyof_request_body(anyof) - ### Example @@ -183,15 +177,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -202,9 +196,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_request_body.response_for_200.ApiResponse) | success -#### post_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -219,8 +213,6 @@ No authorization required # **post_anyof_response_body_for_content_types** -> Anyof post_anyof_response_body_for_content_types() - ### Example @@ -255,16 +247,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -278,8 +270,6 @@ No authorization required # **post_anyof_with_base_schema_request_body** -> post_anyof_with_base_schema_request_body(body) - ### Example @@ -313,15 +303,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -332,9 +322,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -349,8 +339,6 @@ No authorization required # **post_anyof_with_base_schema_response_body_for_content_types** -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - ### Example @@ -385,16 +373,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -408,8 +396,6 @@ No authorization required # **post_anyof_with_one_empty_schema_request_body** -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - ### Example @@ -443,15 +429,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -462,9 +448,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -479,8 +465,6 @@ No authorization required # **post_anyof_with_one_empty_schema_response_body_for_content_types** -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -515,16 +499,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -538,8 +522,6 @@ No authorization required # **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 @@ -573,15 +555,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -592,9 +574,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -609,8 +591,6 @@ No authorization required # **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 @@ -645,16 +625,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.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 index 7476fb33f5c..9b6065023bc 100644 --- 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 @@ -182,8 +182,6 @@ Method | HTTP request | Description # **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 @@ -220,15 +218,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -239,9 +237,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -256,8 +254,6 @@ No authorization required # **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 @@ -292,16 +288,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -315,8 +311,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_request_body** -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - ### Example @@ -350,15 +344,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -369,9 +363,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -386,8 +380,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - ### Example @@ -422,16 +414,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -445,8 +437,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_request_body** -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - ### Example @@ -482,15 +472,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -501,9 +491,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -518,8 +508,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - ### Example @@ -554,16 +542,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -577,8 +565,6 @@ No authorization required # **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 @@ -612,15 +598,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -631,9 +617,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -648,8 +634,6 @@ No authorization required # **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 @@ -684,16 +668,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -707,8 +691,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_request_body** -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - ### Example @@ -742,15 +724,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_combined_with_anyof_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_combined_with_anyof_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -761,9 +743,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_request_body.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -778,8 +760,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_response_body_for_content_types** -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - ### Example @@ -814,16 +794,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -837,8 +817,6 @@ No authorization required # **post_allof_request_body** -> post_allof_request_body(allof) - ### Example @@ -872,15 +850,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -891,9 +869,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_request_body.response_for_200.ApiResponse) | success -#### post_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -908,8 +886,6 @@ No authorization required # **post_allof_response_body_for_content_types** -> Allof post_allof_response_body_for_content_types() - ### Example @@ -944,16 +920,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -967,8 +943,6 @@ No authorization required # **post_allof_simple_types_request_body** -> post_allof_simple_types_request_body(allof_simple_types) - ### Example @@ -1002,15 +976,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_simple_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_simple_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1021,9 +995,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_request_body.response_for_200.ApiResponse) | success -#### post_allof_simple_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1038,8 +1012,6 @@ No authorization required # **post_allof_simple_types_response_body_for_content_types** -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - ### Example @@ -1074,16 +1046,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1097,8 +1069,6 @@ No authorization required # **post_allof_with_base_schema_request_body** -> post_allof_with_base_schema_request_body(allof_with_base_schema) - ### Example @@ -1132,15 +1102,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1151,9 +1121,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1168,8 +1138,6 @@ No authorization required # **post_allof_with_base_schema_response_body_for_content_types** -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - ### Example @@ -1204,16 +1172,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1227,8 +1195,6 @@ No authorization required # **post_allof_with_one_empty_schema_request_body** -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - ### Example @@ -1262,15 +1228,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1281,9 +1247,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1298,8 +1264,6 @@ No authorization required # **post_allof_with_one_empty_schema_response_body_for_content_types** -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -1334,16 +1298,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1357,8 +1321,6 @@ No authorization required # **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 @@ -1392,15 +1354,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_first_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_first_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1411,9 +1373,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1428,8 +1390,6 @@ No authorization required # **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 @@ -1464,16 +1424,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1487,8 +1447,6 @@ No authorization required # **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 @@ -1522,15 +1480,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_last_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_last_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1541,9 +1499,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1558,8 +1516,6 @@ No authorization required # **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 @@ -1594,16 +1550,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1617,8 +1573,6 @@ No authorization required # **post_allof_with_two_empty_schemas_request_body** -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - ### Example @@ -1652,15 +1606,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_two_empty_schemas_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_two_empty_schemas_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1671,9 +1625,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1688,8 +1642,6 @@ No authorization required # **post_allof_with_two_empty_schemas_response_body_for_content_types** -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - ### Example @@ -1724,16 +1676,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1747,8 +1699,6 @@ No authorization required # **post_anyof_complex_types_request_body** -> post_anyof_complex_types_request_body(anyof_complex_types) - ### Example @@ -1782,15 +1732,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1801,9 +1751,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1818,8 +1768,6 @@ No authorization required # **post_anyof_complex_types_response_body_for_content_types** -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - ### Example @@ -1854,16 +1802,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1877,8 +1825,6 @@ No authorization required # **post_anyof_request_body** -> post_anyof_request_body(anyof) - ### Example @@ -1912,15 +1858,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1931,9 +1877,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_request_body.response_for_200.ApiResponse) | success -#### post_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1948,8 +1894,6 @@ No authorization required # **post_anyof_response_body_for_content_types** -> Anyof post_anyof_response_body_for_content_types() - ### Example @@ -1984,16 +1928,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -2007,8 +1951,6 @@ No authorization required # **post_anyof_with_base_schema_request_body** -> post_anyof_with_base_schema_request_body(body) - ### Example @@ -2042,15 +1984,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2061,9 +2003,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2078,8 +2020,6 @@ No authorization required # **post_anyof_with_base_schema_response_body_for_content_types** -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - ### Example @@ -2114,16 +2054,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2137,8 +2077,6 @@ No authorization required # **post_anyof_with_one_empty_schema_request_body** -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - ### Example @@ -2172,15 +2110,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2191,9 +2129,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2208,8 +2146,6 @@ No authorization required # **post_anyof_with_one_empty_schema_response_body_for_content_types** -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -2244,16 +2180,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2267,8 +2203,6 @@ No authorization required # **post_array_type_matches_arrays_request_body** -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - ### Example @@ -2304,15 +2238,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_array_type_matches_arrays_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_array_type_matches_arrays_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2323,9 +2257,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_request_body.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2340,8 +2274,6 @@ No authorization required # **post_array_type_matches_arrays_response_body_for_content_types** -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - ### Example @@ -2376,16 +2308,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2399,8 +2331,6 @@ No authorization required # **post_boolean_type_matches_booleans_request_body** -> post_boolean_type_matches_booleans_request_body(body) - ### Example @@ -2434,15 +2364,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_boolean_type_matches_booleans_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_boolean_type_matches_booleans_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -2453,9 +2383,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_request_body.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2470,8 +2400,6 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() - ### Example @@ -2506,16 +2434,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -2529,8 +2457,6 @@ No authorization required # **post_by_int_request_body** -> post_by_int_request_body(body) - ### Example @@ -2564,15 +2490,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_int_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_int_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2583,9 +2509,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_int_request_body.response_for_200.ApiResponse) | success -#### post_by_int_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2600,8 +2526,6 @@ No authorization required # **post_by_int_response_body_for_content_types** -> ByInt post_by_int_response_body_for_content_types() - ### Example @@ -2636,16 +2560,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_int_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_int_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2659,8 +2583,6 @@ No authorization required # **post_by_number_request_body** -> post_by_number_request_body(body) - ### Example @@ -2694,15 +2616,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2713,9 +2635,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_number_request_body.response_for_200.ApiResponse) | success -#### post_by_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2730,8 +2652,6 @@ No authorization required # **post_by_number_response_body_for_content_types** -> ByNumber post_by_number_response_body_for_content_types() - ### Example @@ -2766,16 +2686,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2789,8 +2709,6 @@ No authorization required # **post_by_small_number_request_body** -> post_by_small_number_request_body(body) - ### Example @@ -2824,15 +2742,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_small_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_small_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2843,9 +2761,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_request_body.response_for_200.ApiResponse) | success -#### post_by_small_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2860,8 +2778,6 @@ No authorization required # **post_by_small_number_response_body_for_content_types** -> BySmallNumber post_by_small_number_response_body_for_content_types() - ### Example @@ -2896,16 +2812,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2919,8 +2835,6 @@ No authorization required # **post_date_time_format_request_body** -> post_date_time_format_request_body(body) - ### Example @@ -2954,15 +2868,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_date_time_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_date_time_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -2973,9 +2887,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_request_body.response_for_200.ApiResponse) | success -#### post_date_time_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2990,8 +2904,6 @@ No authorization required # **post_date_time_format_response_body_for_content_types** -> DateTimeFormat post_date_time_format_response_body_for_content_types() - ### Example @@ -3026,16 +2938,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -3049,8 +2961,6 @@ No authorization required # **post_email_format_request_body** -> post_email_format_request_body(body) - ### Example @@ -3084,15 +2994,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_email_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_email_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -3103,9 +3013,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_email_format_request_body.response_for_200.ApiResponse) | success -#### post_email_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3120,8 +3030,6 @@ No authorization required # **post_email_format_response_body_for_content_types** -> EmailFormat post_email_format_response_body_for_content_types() - ### Example @@ -3156,16 +3064,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_email_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_email_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -3179,8 +3087,6 @@ No authorization required # **post_enum_with0_does_not_match_false_request_body** -> post_enum_with0_does_not_match_false_request_body(body) - ### Example @@ -3214,15 +3120,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with0_does_not_match_false_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with0_does_not_match_false_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3233,9 +3139,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_request_body.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3250,8 +3156,6 @@ No authorization required # **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 @@ -3286,16 +3190,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3309,8 +3213,6 @@ No authorization required # **post_enum_with1_does_not_match_true_request_body** -> post_enum_with1_does_not_match_true_request_body(body) - ### Example @@ -3344,15 +3246,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with1_does_not_match_true_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with1_does_not_match_true_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3363,9 +3265,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_request_body.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3380,8 +3282,6 @@ No authorization required # **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 @@ -3416,16 +3316,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3439,8 +3339,6 @@ No authorization required # **post_enum_with_escaped_characters_request_body** -> post_enum_with_escaped_characters_request_body(body) - ### Example @@ -3474,15 +3372,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3493,9 +3391,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3510,8 +3408,6 @@ No authorization required # **post_enum_with_escaped_characters_response_body_for_content_types** -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - ### Example @@ -3546,16 +3442,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3569,8 +3465,6 @@ No authorization required # **post_enum_with_false_does_not_match0_request_body** -> post_enum_with_false_does_not_match0_request_body(body) - ### Example @@ -3604,15 +3498,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_false_does_not_match0_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_false_does_not_match0_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3623,9 +3517,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3640,8 +3534,6 @@ No authorization required # **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 @@ -3676,16 +3568,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3699,8 +3591,6 @@ No authorization required # **post_enum_with_true_does_not_match1_request_body** -> post_enum_with_true_does_not_match1_request_body(body) - ### Example @@ -3734,15 +3624,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_true_does_not_match1_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_true_does_not_match1_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3753,9 +3643,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3770,8 +3660,6 @@ No authorization required # **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 @@ -3806,16 +3694,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3829,8 +3717,6 @@ No authorization required # **post_enums_in_properties_request_body** -> post_enums_in_properties_request_body(enums_in_properties) - ### Example @@ -3867,15 +3753,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enums_in_properties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enums_in_properties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3886,9 +3772,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_request_body.response_for_200.ApiResponse) | success -#### post_enums_in_properties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3903,8 +3789,6 @@ No authorization required # **post_enums_in_properties_response_body_for_content_types** -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - ### Example @@ -3939,16 +3823,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3962,8 +3846,6 @@ No authorization required # **post_forbidden_property_request_body** -> post_forbidden_property_request_body(forbidden_property) - ### Example @@ -3997,15 +3879,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_forbidden_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_forbidden_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4016,9 +3898,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_request_body.response_for_200.ApiResponse) | success -#### post_forbidden_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4033,8 +3915,6 @@ No authorization required # **post_forbidden_property_response_body_for_content_types** -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - ### Example @@ -4069,16 +3949,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4092,8 +3972,6 @@ No authorization required # **post_hostname_format_request_body** -> post_hostname_format_request_body(body) - ### Example @@ -4127,15 +4005,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_hostname_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_hostname_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -4146,9 +4024,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_request_body.response_for_200.ApiResponse) | success -#### post_hostname_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4163,8 +4041,6 @@ No authorization required # **post_hostname_format_response_body_for_content_types** -> HostnameFormat post_hostname_format_response_body_for_content_types() - ### Example @@ -4199,16 +4075,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -4222,8 +4098,6 @@ No authorization required # **post_integer_type_matches_integers_request_body** -> post_integer_type_matches_integers_request_body(body) - ### Example @@ -4257,15 +4131,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_integer_type_matches_integers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_integer_type_matches_integers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -4276,9 +4150,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_request_body.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4293,8 +4167,6 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() - ### Example @@ -4329,16 +4201,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -4352,8 +4224,6 @@ No authorization required # **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 @@ -4387,15 +4257,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4406,9 +4276,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4423,8 +4293,6 @@ No authorization required # **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 @@ -4459,16 +4327,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4482,8 +4350,6 @@ No authorization required # **post_invalid_string_value_for_default_request_body** -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - ### Example @@ -4517,15 +4383,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_string_value_for_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_string_value_for_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4536,9 +4402,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_request_body.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4553,8 +4419,6 @@ No authorization required # **post_invalid_string_value_for_default_response_body_for_content_types** -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - ### Example @@ -4589,16 +4453,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4612,8 +4476,6 @@ No authorization required # **post_ipv4_format_request_body** -> post_ipv4_format_request_body(body) - ### Example @@ -4647,15 +4509,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv4_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv4_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -4666,9 +4528,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv4_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4683,8 +4545,6 @@ No authorization required # **post_ipv4_format_response_body_for_content_types** -> Ipv4Format post_ipv4_format_response_body_for_content_types() - ### Example @@ -4719,16 +4579,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -4742,8 +4602,6 @@ No authorization required # **post_ipv6_format_request_body** -> post_ipv6_format_request_body(body) - ### Example @@ -4777,15 +4635,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv6_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv6_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -4796,9 +4654,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv6_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4813,8 +4671,6 @@ No authorization required # **post_ipv6_format_response_body_for_content_types** -> Ipv6Format post_ipv6_format_response_body_for_content_types() - ### Example @@ -4849,16 +4705,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -4872,8 +4728,6 @@ No authorization required # **post_json_pointer_format_request_body** -> post_json_pointer_format_request_body(body) - ### Example @@ -4907,15 +4761,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_json_pointer_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_json_pointer_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -4926,9 +4780,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_request_body.response_for_200.ApiResponse) | success -#### post_json_pointer_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4943,8 +4797,6 @@ No authorization required # **post_json_pointer_format_response_body_for_content_types** -> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() - ### Example @@ -4979,16 +4831,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -5002,8 +4854,6 @@ No authorization required # **post_maximum_validation_request_body** -> post_maximum_validation_request_body(body) - ### Example @@ -5037,15 +4887,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5056,9 +4906,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5073,8 +4923,6 @@ No authorization required # **post_maximum_validation_response_body_for_content_types** -> MaximumValidation post_maximum_validation_response_body_for_content_types() - ### Example @@ -5109,16 +4957,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5132,8 +4980,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_request_body** -> post_maximum_validation_with_unsigned_integer_request_body(body) - ### Example @@ -5167,15 +5013,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5186,9 +5032,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5203,8 +5049,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - ### Example @@ -5239,16 +5083,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5262,8 +5106,6 @@ No authorization required # **post_maxitems_validation_request_body** -> post_maxitems_validation_request_body(body) - ### Example @@ -5297,15 +5139,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5316,9 +5158,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5333,8 +5175,6 @@ No authorization required # **post_maxitems_validation_response_body_for_content_types** -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - ### Example @@ -5369,16 +5209,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5392,8 +5232,6 @@ No authorization required # **post_maxlength_validation_request_body** -> post_maxlength_validation_request_body(body) - ### Example @@ -5427,15 +5265,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5446,9 +5284,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5463,8 +5301,6 @@ No authorization required # **post_maxlength_validation_response_body_for_content_types** -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - ### Example @@ -5499,16 +5335,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5522,8 +5358,6 @@ No authorization required # **post_maxproperties0_means_the_object_is_empty_request_body** -> post_maxproperties0_means_the_object_is_empty_request_body(body) - ### Example @@ -5557,15 +5391,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5576,9 +5410,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5593,8 +5427,6 @@ No authorization required # **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 @@ -5629,16 +5461,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5652,8 +5484,6 @@ No authorization required # **post_maxproperties_validation_request_body** -> post_maxproperties_validation_request_body(body) - ### Example @@ -5687,15 +5517,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5706,9 +5536,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5723,8 +5553,6 @@ No authorization required # **post_maxproperties_validation_response_body_for_content_types** -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - ### Example @@ -5759,16 +5587,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5782,8 +5610,6 @@ No authorization required # **post_minimum_validation_request_body** -> post_minimum_validation_request_body(body) - ### Example @@ -5817,15 +5643,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5836,9 +5662,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5853,8 +5679,6 @@ No authorization required # **post_minimum_validation_response_body_for_content_types** -> MinimumValidation post_minimum_validation_response_body_for_content_types() - ### Example @@ -5889,16 +5713,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5912,8 +5736,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_request_body** -> post_minimum_validation_with_signed_integer_request_body(body) - ### Example @@ -5947,15 +5769,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_with_signed_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_with_signed_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -5966,9 +5788,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5983,8 +5805,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_response_body_for_content_types** -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - ### Example @@ -6019,16 +5839,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -6042,8 +5862,6 @@ No authorization required # **post_minitems_validation_request_body** -> post_minitems_validation_request_body(body) - ### Example @@ -6077,15 +5895,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6096,9 +5914,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_minitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6113,8 +5931,6 @@ No authorization required # **post_minitems_validation_response_body_for_content_types** -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - ### Example @@ -6149,16 +5965,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6172,8 +5988,6 @@ No authorization required # **post_minlength_validation_request_body** -> post_minlength_validation_request_body(body) - ### Example @@ -6207,15 +6021,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6226,9 +6040,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_minlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6243,8 +6057,6 @@ No authorization required # **post_minlength_validation_response_body_for_content_types** -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - ### Example @@ -6279,16 +6091,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6302,8 +6114,6 @@ No authorization required # **post_minproperties_validation_request_body** -> post_minproperties_validation_request_body(body) - ### Example @@ -6337,15 +6147,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6356,9 +6166,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_minproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6373,8 +6183,6 @@ No authorization required # **post_minproperties_validation_response_body_for_content_types** -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - ### Example @@ -6409,16 +6217,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6432,8 +6240,6 @@ No authorization required # **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 @@ -6467,15 +6273,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6486,9 +6292,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6503,8 +6309,6 @@ No authorization required # **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 @@ -6539,16 +6343,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6562,8 +6366,6 @@ No authorization required # **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 @@ -6597,15 +6399,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6616,9 +6418,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6633,8 +6435,6 @@ No authorization required # **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 @@ -6669,16 +6469,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6692,8 +6492,6 @@ No authorization required # **post_nested_items_request_body** -> post_nested_items_request_body(nested_items) - ### Example @@ -6735,15 +6533,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6754,9 +6552,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_items_request_body.response_for_200.ApiResponse) | success -#### post_nested_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6771,8 +6569,6 @@ No authorization required # **post_nested_items_response_body_for_content_types** -> NestedItems post_nested_items_response_body_for_content_types() - ### Example @@ -6807,16 +6603,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6830,8 +6626,6 @@ No authorization required # **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 @@ -6865,15 +6659,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6884,9 +6678,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6901,8 +6695,6 @@ No authorization required # **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 @@ -6937,16 +6729,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6960,8 +6752,6 @@ No authorization required # **post_not_more_complex_schema_request_body** -> post_not_more_complex_schema_request_body(body) - ### Example @@ -6995,15 +6785,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_more_complex_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_more_complex_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -7014,9 +6804,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_request_body.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7031,8 +6821,6 @@ No authorization required # **post_not_more_complex_schema_response_body_for_content_types** -> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() - ### Example @@ -7067,16 +6855,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -7090,8 +6878,6 @@ No authorization required # **post_not_request_body** -> post_not_request_body(body) - ### Example @@ -7125,15 +6911,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -7144,9 +6930,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_request_body.response_for_200.ApiResponse) | success -#### post_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7161,8 +6947,6 @@ No authorization required # **post_not_response_body_for_content_types** -> ModelNot post_not_response_body_for_content_types() - ### Example @@ -7197,16 +6981,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -7220,8 +7004,6 @@ No authorization required # **post_nul_characters_in_strings_request_body** -> post_nul_characters_in_strings_request_body(body) - ### Example @@ -7255,15 +7037,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nul_characters_in_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nul_characters_in_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7274,9 +7056,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_request_body.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7291,8 +7073,6 @@ No authorization required # **post_nul_characters_in_strings_response_body_for_content_types** -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - ### Example @@ -7327,16 +7107,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7350,8 +7130,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_request_body** -> post_null_type_matches_only_the_null_object_request_body(body) - ### Example @@ -7385,15 +7163,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_null_type_matches_only_the_null_object_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_null_type_matches_only_the_null_object_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -7404,9 +7182,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_request_body.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7421,8 +7199,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_response_body_for_content_types** -> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() - ### Example @@ -7457,16 +7233,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -7480,8 +7256,6 @@ No authorization required # **post_number_type_matches_numbers_request_body** -> post_number_type_matches_numbers_request_body(body) - ### Example @@ -7515,15 +7289,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_number_type_matches_numbers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_number_type_matches_numbers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -7534,9 +7308,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_request_body.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7551,8 +7325,6 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() - ### Example @@ -7587,16 +7359,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -7610,8 +7382,6 @@ No authorization required # **post_object_properties_validation_request_body** -> post_object_properties_validation_request_body(object_properties_validation) - ### Example @@ -7645,15 +7415,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_properties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_properties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7664,9 +7434,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_request_body.response_for_200.ApiResponse) | success -#### post_object_properties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7681,8 +7451,6 @@ No authorization required # **post_object_properties_validation_response_body_for_content_types** -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - ### Example @@ -7717,16 +7485,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7740,8 +7508,6 @@ No authorization required # **post_object_type_matches_objects_request_body** -> post_object_type_matches_objects_request_body(body) - ### Example @@ -7775,15 +7541,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_type_matches_objects_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_type_matches_objects_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -7794,9 +7560,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_request_body.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7811,8 +7577,6 @@ No authorization required # **post_object_type_matches_objects_response_body_for_content_types** -> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() - ### Example @@ -7847,16 +7611,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -7870,8 +7634,6 @@ No authorization required # **post_oneof_complex_types_request_body** -> post_oneof_complex_types_request_body(oneof_complex_types) - ### Example @@ -7905,15 +7667,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -7924,9 +7686,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7941,8 +7703,6 @@ No authorization required # **post_oneof_complex_types_response_body_for_content_types** -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - ### Example @@ -7977,16 +7737,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -8000,8 +7760,6 @@ No authorization required # **post_oneof_request_body** -> post_oneof_request_body(oneof) - ### Example @@ -8035,15 +7793,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8054,9 +7812,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_request_body.response_for_200.ApiResponse) | success -#### post_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8071,8 +7829,6 @@ No authorization required # **post_oneof_response_body_for_content_types** -> Oneof post_oneof_response_body_for_content_types() - ### Example @@ -8107,16 +7863,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8130,8 +7886,6 @@ No authorization required # **post_oneof_with_base_schema_request_body** -> post_oneof_with_base_schema_request_body(body) - ### Example @@ -8165,15 +7919,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8184,9 +7938,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8201,8 +7955,6 @@ No authorization required # **post_oneof_with_base_schema_response_body_for_content_types** -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - ### Example @@ -8237,16 +7989,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8260,8 +8012,6 @@ No authorization required # **post_oneof_with_empty_schema_request_body** -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - ### Example @@ -8295,15 +8045,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8314,9 +8064,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8331,8 +8081,6 @@ No authorization required # **post_oneof_with_empty_schema_response_body_for_content_types** -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - ### Example @@ -8367,16 +8115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8390,8 +8138,6 @@ No authorization required # **post_oneof_with_required_request_body** -> post_oneof_with_required_request_body(oneof_with_required) - ### Example @@ -8425,15 +8171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_required_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_required_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8444,9 +8190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_required_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8461,8 +8207,6 @@ No authorization required # **post_oneof_with_required_response_body_for_content_types** -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - ### Example @@ -8497,16 +8241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8520,8 +8264,6 @@ No authorization required # **post_pattern_is_not_anchored_request_body** -> post_pattern_is_not_anchored_request_body(body) - ### Example @@ -8555,15 +8297,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_is_not_anchored_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_is_not_anchored_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8574,9 +8316,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_request_body.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8591,8 +8333,6 @@ No authorization required # **post_pattern_is_not_anchored_response_body_for_content_types** -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - ### Example @@ -8627,16 +8367,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8650,8 +8390,6 @@ No authorization required # **post_pattern_validation_request_body** -> post_pattern_validation_request_body(body) - ### Example @@ -8685,15 +8423,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8704,9 +8442,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_request_body.response_for_200.ApiResponse) | success -#### post_pattern_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8721,8 +8459,6 @@ No authorization required # **post_pattern_validation_response_body_for_content_types** -> PatternValidation post_pattern_validation_response_body_for_content_types() - ### Example @@ -8757,16 +8493,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8780,8 +8516,6 @@ No authorization required # **post_properties_with_escaped_characters_request_body** -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - ### Example @@ -8815,15 +8549,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_properties_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_properties_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8834,9 +8568,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8851,8 +8585,6 @@ No authorization required # **post_properties_with_escaped_characters_response_body_for_content_types** -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - ### Example @@ -8887,16 +8619,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8910,8 +8642,6 @@ No authorization required # **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 @@ -8945,15 +8675,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -8964,9 +8694,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_request_body.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8981,8 +8711,6 @@ No authorization required # **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 @@ -9017,16 +8745,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -9040,8 +8768,6 @@ No authorization required # **post_ref_in_additionalproperties_request_body** -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - ### Example @@ -9077,15 +8803,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_additionalproperties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_additionalproperties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9096,9 +8822,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9113,8 +8839,6 @@ No authorization required # **post_ref_in_additionalproperties_response_body_for_content_types** -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - ### Example @@ -9149,16 +8873,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9172,8 +8896,6 @@ No authorization required # **post_ref_in_allof_request_body** -> post_ref_in_allof_request_body(ref_in_allof) - ### Example @@ -9207,15 +8929,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9226,9 +8948,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9243,8 +8965,6 @@ No authorization required # **post_ref_in_allof_response_body_for_content_types** -> RefInAllof post_ref_in_allof_response_body_for_content_types() - ### Example @@ -9279,16 +8999,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9302,8 +9022,6 @@ No authorization required # **post_ref_in_anyof_request_body** -> post_ref_in_anyof_request_body(ref_in_anyof) - ### Example @@ -9337,15 +9055,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9356,9 +9074,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9373,8 +9091,6 @@ No authorization required # **post_ref_in_anyof_response_body_for_content_types** -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - ### Example @@ -9409,16 +9125,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9432,8 +9148,6 @@ No authorization required # **post_ref_in_items_request_body** -> post_ref_in_items_request_body(ref_in_items) - ### Example @@ -9469,15 +9183,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9488,9 +9202,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9505,8 +9219,6 @@ No authorization required # **post_ref_in_items_response_body_for_content_types** -> RefInItems post_ref_in_items_response_body_for_content_types() - ### Example @@ -9541,16 +9253,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9564,8 +9276,6 @@ No authorization required # **post_ref_in_not_request_body** -> post_ref_in_not_request_body(body) - ### Example @@ -9599,15 +9309,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -9618,9 +9328,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9635,8 +9345,6 @@ No authorization required # **post_ref_in_not_response_body_for_content_types** -> RefInNot post_ref_in_not_response_body_for_content_types() - ### Example @@ -9671,16 +9379,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -9694,8 +9402,6 @@ No authorization required # **post_ref_in_oneof_request_body** -> post_ref_in_oneof_request_body(ref_in_oneof) - ### Example @@ -9729,15 +9435,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9748,9 +9454,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9765,8 +9471,6 @@ No authorization required # **post_ref_in_oneof_response_body_for_content_types** -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - ### Example @@ -9801,16 +9505,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9824,8 +9528,6 @@ No authorization required # **post_ref_in_property_request_body** -> post_ref_in_property_request_body(ref_in_property) - ### Example @@ -9859,15 +9561,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -9878,9 +9580,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9895,8 +9597,6 @@ No authorization required # **post_ref_in_property_response_body_for_content_types** -> RefInProperty post_ref_in_property_response_body_for_content_types() - ### Example @@ -9931,16 +9631,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -9954,8 +9654,6 @@ No authorization required # **post_required_default_validation_request_body** -> post_required_default_validation_request_body(required_default_validation) - ### Example @@ -9989,15 +9687,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_default_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_default_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10008,9 +9706,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_default_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10025,8 +9723,6 @@ No authorization required # **post_required_default_validation_response_body_for_content_types** -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - ### Example @@ -10061,16 +9757,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10084,8 +9780,6 @@ No authorization required # **post_required_validation_request_body** -> post_required_validation_request_body(required_validation) - ### Example @@ -10119,15 +9813,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10138,9 +9832,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10155,8 +9849,6 @@ No authorization required # **post_required_validation_response_body_for_content_types** -> RequiredValidation post_required_validation_response_body_for_content_types() - ### Example @@ -10191,16 +9883,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10214,8 +9906,6 @@ No authorization required # **post_required_with_empty_array_request_body** -> post_required_with_empty_array_request_body(required_with_empty_array) - ### Example @@ -10249,15 +9939,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_empty_array_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_empty_array_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10268,9 +9958,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_request_body.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10285,8 +9975,6 @@ No authorization required # **post_required_with_empty_array_response_body_for_content_types** -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - ### Example @@ -10321,16 +10009,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10344,8 +10032,6 @@ No authorization required # **post_required_with_escaped_characters_request_body** -> post_required_with_escaped_characters_request_body(body) - ### Example @@ -10379,15 +10065,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -10398,9 +10084,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10415,8 +10101,6 @@ No authorization required # **post_required_with_escaped_characters_response_body_for_content_types** -> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() - ### Example @@ -10451,16 +10135,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -10474,8 +10158,6 @@ No authorization required # **post_simple_enum_validation_request_body** -> post_simple_enum_validation_request_body(body) - ### Example @@ -10509,15 +10191,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_simple_enum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_simple_enum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10528,9 +10210,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_request_body.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10545,8 +10227,6 @@ No authorization required # **post_simple_enum_validation_response_body_for_content_types** -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - ### Example @@ -10581,16 +10261,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10604,8 +10284,6 @@ No authorization required # **post_string_type_matches_strings_request_body** -> post_string_type_matches_strings_request_body(body) - ### Example @@ -10639,15 +10317,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_string_type_matches_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_string_type_matches_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -10658,9 +10336,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_request_body.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10675,8 +10353,6 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() - ### Example @@ -10711,16 +10387,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -10734,8 +10410,6 @@ No authorization required # **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 @@ -10771,15 +10445,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10790,9 +10464,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10807,8 +10481,6 @@ No authorization required # **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 @@ -10843,16 +10515,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10866,8 +10538,6 @@ No authorization required # **post_uniqueitems_false_validation_request_body** -> post_uniqueitems_false_validation_request_body(body) - ### Example @@ -10901,15 +10571,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_false_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_false_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -10920,9 +10590,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10937,8 +10607,6 @@ No authorization required # **post_uniqueitems_false_validation_response_body_for_content_types** -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - ### Example @@ -10973,16 +10641,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -10996,8 +10664,6 @@ No authorization required # **post_uniqueitems_validation_request_body** -> post_uniqueitems_validation_request_body(body) - ### Example @@ -11031,15 +10697,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11050,9 +10716,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11067,8 +10733,6 @@ No authorization required # **post_uniqueitems_validation_response_body_for_content_types** -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - ### Example @@ -11103,16 +10767,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11126,8 +10790,6 @@ No authorization required # **post_uri_format_request_body** -> post_uri_format_request_body(body) - ### Example @@ -11161,15 +10823,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -11180,9 +10842,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11197,8 +10859,6 @@ No authorization required # **post_uri_format_response_body_for_content_types** -> UriFormat post_uri_format_response_body_for_content_types() - ### Example @@ -11233,16 +10893,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -11256,8 +10916,6 @@ No authorization required # **post_uri_reference_format_request_body** -> post_uri_reference_format_request_body(body) - ### Example @@ -11291,15 +10949,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_reference_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_reference_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -11310,9 +10968,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_reference_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11327,8 +10985,6 @@ No authorization required # **post_uri_reference_format_response_body_for_content_types** -> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() - ### Example @@ -11363,16 +11019,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -11386,8 +11042,6 @@ No authorization required # **post_uri_template_format_request_body** -> post_uri_template_format_request_body(body) - ### Example @@ -11421,15 +11075,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_template_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_template_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | @@ -11440,9 +11094,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_template_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11457,8 +11111,6 @@ No authorization required # **post_uri_template_format_response_body_for_content_types** -> UriTemplateFormat post_uri_template_format_response_body_for_content_types() - ### Example @@ -11493,16 +11145,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.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 index eb7c0a908df..3670142f4d8 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_invalid_string_value_for_default_request_body** -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_string_value_for_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_string_value_for_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_request_body.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **post_invalid_string_value_for_default_response_body_for_content_types** -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - ### Example @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -142,8 +138,6 @@ No authorization required # **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 @@ -179,15 +173,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -198,9 +192,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -215,8 +209,6 @@ No authorization required # **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 @@ -251,16 +243,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.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 index 2ce684e410c..b0635858e00 100644 --- 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 @@ -24,8 +24,6 @@ Method | HTTP request | Description # **post_enum_with0_does_not_match_false_request_body** -> post_enum_with0_does_not_match_false_request_body(body) - ### Example @@ -59,15 +57,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with0_does_not_match_false_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with0_does_not_match_false_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -78,9 +76,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_request_body.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -95,8 +93,6 @@ No authorization required # **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 @@ -131,16 +127,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -154,8 +150,6 @@ No authorization required # **post_enum_with1_does_not_match_true_request_body** -> post_enum_with1_does_not_match_true_request_body(body) - ### Example @@ -189,15 +183,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with1_does_not_match_true_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with1_does_not_match_true_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -208,9 +202,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_request_body.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -225,8 +219,6 @@ No authorization required # **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 @@ -261,16 +253,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -284,8 +276,6 @@ No authorization required # **post_enum_with_escaped_characters_request_body** -> post_enum_with_escaped_characters_request_body(body) - ### Example @@ -319,15 +309,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -338,9 +328,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -355,8 +345,6 @@ No authorization required # **post_enum_with_escaped_characters_response_body_for_content_types** -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - ### Example @@ -391,16 +379,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -414,8 +402,6 @@ No authorization required # **post_enum_with_false_does_not_match0_request_body** -> post_enum_with_false_does_not_match0_request_body(body) - ### Example @@ -449,15 +435,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_false_does_not_match0_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_false_does_not_match0_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -468,9 +454,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -485,8 +471,6 @@ No authorization required # **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 @@ -521,16 +505,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -544,8 +528,6 @@ No authorization required # **post_enum_with_true_does_not_match1_request_body** -> post_enum_with_true_does_not_match1_request_body(body) - ### Example @@ -579,15 +561,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_true_does_not_match1_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_true_does_not_match1_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -598,9 +580,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -615,8 +597,6 @@ No authorization required # **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 @@ -651,16 +631,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -674,8 +654,6 @@ No authorization required # **post_enums_in_properties_request_body** -> post_enums_in_properties_request_body(enums_in_properties) - ### Example @@ -712,15 +690,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enums_in_properties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enums_in_properties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -731,9 +709,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_request_body.response_for_200.ApiResponse) | success -#### post_enums_in_properties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -748,8 +726,6 @@ No authorization required # **post_enums_in_properties_response_body_for_content_types** -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - ### Example @@ -784,16 +760,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -807,8 +783,6 @@ No authorization required # **post_nul_characters_in_strings_request_body** -> post_nul_characters_in_strings_request_body(body) - ### Example @@ -842,15 +816,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nul_characters_in_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nul_characters_in_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -861,9 +835,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_request_body.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -878,8 +852,6 @@ No authorization required # **post_nul_characters_in_strings_response_body_for_content_types** -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - ### Example @@ -914,16 +886,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -937,8 +909,6 @@ No authorization required # **post_simple_enum_validation_request_body** -> post_simple_enum_validation_request_body(body) - ### Example @@ -972,15 +942,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_simple_enum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_simple_enum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -991,9 +961,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_request_body.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1008,8 +978,6 @@ No authorization required # **post_simple_enum_validation_response_body_for_content_types** -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - ### Example @@ -1044,16 +1012,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.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 index 5678e0ac5cd..1eb9c5d3d0b 100644 --- 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 @@ -26,8 +26,6 @@ Method | HTTP request | Description # **post_date_time_format_request_body** -> post_date_time_format_request_body(body) - ### Example @@ -61,15 +59,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_date_time_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_date_time_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -80,9 +78,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_request_body.response_for_200.ApiResponse) | success -#### post_date_time_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -97,8 +95,6 @@ No authorization required # **post_date_time_format_response_body_for_content_types** -> DateTimeFormat post_date_time_format_response_body_for_content_types() - ### Example @@ -133,16 +129,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -156,8 +152,6 @@ No authorization required # **post_email_format_request_body** -> post_email_format_request_body(body) - ### Example @@ -191,15 +185,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_email_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_email_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -210,9 +204,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_email_format_request_body.response_for_200.ApiResponse) | success -#### post_email_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -227,8 +221,6 @@ No authorization required # **post_email_format_response_body_for_content_types** -> EmailFormat post_email_format_response_body_for_content_types() - ### Example @@ -263,16 +255,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_email_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_email_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -286,8 +278,6 @@ No authorization required # **post_hostname_format_request_body** -> post_hostname_format_request_body(body) - ### Example @@ -321,15 +311,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_hostname_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_hostname_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -340,9 +330,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_request_body.response_for_200.ApiResponse) | success -#### post_hostname_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -357,8 +347,6 @@ No authorization required # **post_hostname_format_response_body_for_content_types** -> HostnameFormat post_hostname_format_response_body_for_content_types() - ### Example @@ -393,16 +381,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -416,8 +404,6 @@ No authorization required # **post_ipv4_format_request_body** -> post_ipv4_format_request_body(body) - ### Example @@ -451,15 +437,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv4_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv4_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -470,9 +456,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv4_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -487,8 +473,6 @@ No authorization required # **post_ipv4_format_response_body_for_content_types** -> Ipv4Format post_ipv4_format_response_body_for_content_types() - ### Example @@ -523,16 +507,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -546,8 +530,6 @@ No authorization required # **post_ipv6_format_request_body** -> post_ipv6_format_request_body(body) - ### Example @@ -581,15 +563,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv6_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv6_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -600,9 +582,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv6_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -617,8 +599,6 @@ No authorization required # **post_ipv6_format_response_body_for_content_types** -> Ipv6Format post_ipv6_format_response_body_for_content_types() - ### Example @@ -653,16 +633,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -676,8 +656,6 @@ No authorization required # **post_json_pointer_format_request_body** -> post_json_pointer_format_request_body(body) - ### Example @@ -711,15 +689,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_json_pointer_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_json_pointer_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -730,9 +708,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_request_body.response_for_200.ApiResponse) | success -#### post_json_pointer_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -747,8 +725,6 @@ No authorization required # **post_json_pointer_format_response_body_for_content_types** -> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() - ### Example @@ -783,16 +759,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -806,8 +782,6 @@ No authorization required # **post_uri_format_request_body** -> post_uri_format_request_body(body) - ### Example @@ -841,15 +815,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -860,9 +834,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -877,8 +851,6 @@ No authorization required # **post_uri_format_response_body_for_content_types** -> UriFormat post_uri_format_response_body_for_content_types() - ### Example @@ -913,16 +885,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -936,8 +908,6 @@ No authorization required # **post_uri_reference_format_request_body** -> post_uri_reference_format_request_body(body) - ### Example @@ -971,15 +941,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_reference_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_reference_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -990,9 +960,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_reference_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1007,8 +977,6 @@ No authorization required # **post_uri_reference_format_response_body_for_content_types** -> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() - ### Example @@ -1043,16 +1011,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -1066,8 +1034,6 @@ No authorization required # **post_uri_template_format_request_body** -> post_uri_template_format_request_body(body) - ### Example @@ -1101,15 +1067,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_template_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_template_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | @@ -1120,9 +1086,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_template_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1137,8 +1103,6 @@ No authorization required # **post_uri_template_format_response_body_for_content_types** -> UriTemplateFormat post_uri_template_format_response_body_for_content_types() - ### Example @@ -1173,16 +1137,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.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 index 3eac0810cff..e1af6fb8716 100644 --- 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 @@ -10,8 +10,6 @@ Method | HTTP request | Description # **post_nested_items_request_body** -> post_nested_items_request_body(nested_items) - ### Example @@ -53,15 +51,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -72,9 +70,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_items_request_body.response_for_200.ApiResponse) | success -#### post_nested_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -89,8 +87,6 @@ No authorization required # **post_nested_items_response_body_for_content_types** -> NestedItems post_nested_items_response_body_for_content_types() - ### Example @@ -125,16 +121,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.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 index deb85e59d0b..835ff85e7f5 100644 --- 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 @@ -10,8 +10,6 @@ Method | HTTP request | Description # **post_maxitems_validation_request_body** -> post_maxitems_validation_request_body(body) - ### Example @@ -45,15 +43,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -64,9 +62,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -81,8 +79,6 @@ No authorization required # **post_maxitems_validation_response_body_for_content_types** -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - ### Example @@ -117,16 +113,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.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 index 5a4d1522dfd..e6c9f74f254 100644 --- 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 @@ -10,8 +10,6 @@ Method | HTTP request | Description # **post_maxlength_validation_request_body** -> post_maxlength_validation_request_body(body) - ### Example @@ -45,15 +43,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -64,9 +62,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -81,8 +79,6 @@ No authorization required # **post_maxlength_validation_response_body_for_content_types** -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - ### Example @@ -117,16 +113,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.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 index d26877b2145..46fb9b9bf41 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_maxproperties0_means_the_object_is_empty_request_body** -> post_maxproperties0_means_the_object_is_empty_request_body(body) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **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 @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -142,8 +138,6 @@ No authorization required # **post_maxproperties_validation_request_body** -> post_maxproperties_validation_request_body(body) - ### Example @@ -177,15 +171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -196,9 +190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -213,8 +207,6 @@ No authorization required # **post_maxproperties_validation_response_body_for_content_types** -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - ### Example @@ -249,16 +241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.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 index b2fc19f34c4..d5e7884efe3 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_maximum_validation_request_body** -> post_maximum_validation_request_body(body) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **post_maximum_validation_response_body_for_content_types** -> MaximumValidation post_maximum_validation_response_body_for_content_types() - ### Example @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -142,8 +138,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_request_body** -> post_maximum_validation_with_unsigned_integer_request_body(body) - ### Example @@ -177,15 +171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -196,9 +190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -213,8 +207,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - ### Example @@ -249,16 +241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.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 index fbe1337b372..6058a8c5e42 100644 --- 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 @@ -10,8 +10,6 @@ Method | HTTP request | Description # **post_minitems_validation_request_body** -> post_minitems_validation_request_body(body) - ### Example @@ -45,15 +43,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -64,9 +62,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_minitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -81,8 +79,6 @@ No authorization required # **post_minitems_validation_response_body_for_content_types** -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - ### Example @@ -117,16 +113,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.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 index 4107597e132..8a9e64df109 100644 --- 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 @@ -10,8 +10,6 @@ Method | HTTP request | Description # **post_minlength_validation_request_body** -> post_minlength_validation_request_body(body) - ### Example @@ -45,15 +43,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -64,9 +62,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_minlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -81,8 +79,6 @@ No authorization required # **post_minlength_validation_response_body_for_content_types** -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - ### Example @@ -117,16 +113,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.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 index 6d02ed479b1..e67e4dfe632 100644 --- 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 @@ -10,8 +10,6 @@ Method | HTTP request | Description # **post_minproperties_validation_request_body** -> post_minproperties_validation_request_body(body) - ### Example @@ -45,15 +43,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -64,9 +62,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_minproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -81,8 +79,6 @@ No authorization required # **post_minproperties_validation_response_body_for_content_types** -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - ### Example @@ -117,16 +113,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.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 index 76bb9154983..8d498544493 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_minimum_validation_request_body** -> post_minimum_validation_request_body(body) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **post_minimum_validation_response_body_for_content_types** -> MinimumValidation post_minimum_validation_response_body_for_content_types() - ### Example @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -142,8 +138,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_request_body** -> post_minimum_validation_with_signed_integer_request_body(body) - ### Example @@ -177,15 +171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_with_signed_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_with_signed_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -196,9 +190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -213,8 +207,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_response_body_for_content_types** -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - ### Example @@ -249,16 +241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.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 index cf1e2949ca4..c5e1f4af462 100644 --- 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 @@ -14,8 +14,6 @@ Method | HTTP request | Description # **post_forbidden_property_request_body** -> post_forbidden_property_request_body(forbidden_property) - ### Example @@ -49,15 +47,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_forbidden_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_forbidden_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -68,9 +66,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_request_body.response_for_200.ApiResponse) | success -#### post_forbidden_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -85,8 +83,6 @@ No authorization required # **post_forbidden_property_response_body_for_content_types** -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - ### Example @@ -121,16 +117,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -144,8 +140,6 @@ No authorization required # **post_not_more_complex_schema_request_body** -> post_not_more_complex_schema_request_body(body) - ### Example @@ -179,15 +173,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_more_complex_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_more_complex_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -198,9 +192,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_request_body.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -215,8 +209,6 @@ No authorization required # **post_not_more_complex_schema_response_body_for_content_types** -> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() - ### Example @@ -251,16 +243,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -274,8 +266,6 @@ No authorization required # **post_not_request_body** -> post_not_request_body(body) - ### Example @@ -309,15 +299,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -328,9 +318,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_request_body.response_for_200.ApiResponse) | success -#### post_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -345,8 +335,6 @@ No authorization required # **post_not_response_body_for_content_types** -> ModelNot post_not_response_body_for_content_types() - ### Example @@ -381,16 +369,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.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 index 7e23285ae43..5bd7a567eb6 100644 --- 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 @@ -16,8 +16,6 @@ Method | HTTP request | Description # **post_by_int_request_body** -> post_by_int_request_body(body) - ### Example @@ -51,15 +49,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_int_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_int_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -70,9 +68,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_int_request_body.response_for_200.ApiResponse) | success -#### post_by_int_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -87,8 +85,6 @@ No authorization required # **post_by_int_response_body_for_content_types** -> ByInt post_by_int_response_body_for_content_types() - ### Example @@ -123,16 +119,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_int_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_int_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -146,8 +142,6 @@ No authorization required # **post_by_number_request_body** -> post_by_number_request_body(body) - ### Example @@ -181,15 +175,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -200,9 +194,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_number_request_body.response_for_200.ApiResponse) | success -#### post_by_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -217,8 +211,6 @@ No authorization required # **post_by_number_response_body_for_content_types** -> ByNumber post_by_number_response_body_for_content_types() - ### Example @@ -253,16 +245,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -276,8 +268,6 @@ No authorization required # **post_by_small_number_request_body** -> post_by_small_number_request_body(body) - ### Example @@ -311,15 +301,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_small_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_small_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -330,9 +320,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_request_body.response_for_200.ApiResponse) | success -#### post_by_small_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -347,8 +337,6 @@ No authorization required # **post_by_small_number_response_body_for_content_types** -> BySmallNumber post_by_small_number_response_body_for_content_types() - ### Example @@ -383,16 +371,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -406,8 +394,6 @@ No authorization required # **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 @@ -441,15 +427,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -460,9 +446,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -477,8 +463,6 @@ No authorization required # **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 @@ -513,16 +497,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.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 index e4a803a45a6..36d4871b16a 100644 --- 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 @@ -20,8 +20,6 @@ Method | HTTP request | Description # **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 @@ -55,15 +53,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -74,9 +72,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -91,8 +89,6 @@ No authorization required # **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 @@ -127,16 +123,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -150,8 +146,6 @@ No authorization required # **post_oneof_complex_types_request_body** -> post_oneof_complex_types_request_body(oneof_complex_types) - ### Example @@ -185,15 +179,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -204,9 +198,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -221,8 +215,6 @@ No authorization required # **post_oneof_complex_types_response_body_for_content_types** -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - ### Example @@ -257,16 +249,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -280,8 +272,6 @@ No authorization required # **post_oneof_request_body** -> post_oneof_request_body(oneof) - ### Example @@ -315,15 +305,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -334,9 +324,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_request_body.response_for_200.ApiResponse) | success -#### post_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -351,8 +341,6 @@ No authorization required # **post_oneof_response_body_for_content_types** -> Oneof post_oneof_response_body_for_content_types() - ### Example @@ -387,16 +375,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -410,8 +398,6 @@ No authorization required # **post_oneof_with_base_schema_request_body** -> post_oneof_with_base_schema_request_body(body) - ### Example @@ -445,15 +431,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -464,9 +450,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -481,8 +467,6 @@ No authorization required # **post_oneof_with_base_schema_response_body_for_content_types** -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - ### Example @@ -517,16 +501,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -540,8 +524,6 @@ No authorization required # **post_oneof_with_empty_schema_request_body** -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - ### Example @@ -575,15 +557,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -594,9 +576,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -611,8 +593,6 @@ No authorization required # **post_oneof_with_empty_schema_response_body_for_content_types** -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - ### Example @@ -647,16 +627,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -670,8 +650,6 @@ No authorization required # **post_oneof_with_required_request_body** -> post_oneof_with_required_request_body(oneof_with_required) - ### Example @@ -705,15 +683,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_required_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_required_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -724,9 +702,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_required_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -741,8 +719,6 @@ No authorization required # **post_oneof_with_required_response_body_for_content_types** -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - ### Example @@ -777,16 +753,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.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 index 220a343e6ca..0dd8ffcb6ed 100644 --- 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 @@ -95,8 +95,6 @@ Method | HTTP request | Description # **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 @@ -133,15 +131,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -152,9 +150,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -169,8 +167,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_request_body** -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - ### Example @@ -204,15 +200,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -223,9 +219,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -240,8 +236,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_request_body** -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - ### Example @@ -277,15 +271,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -296,9 +290,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -313,8 +307,6 @@ No authorization required # **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 @@ -348,15 +340,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -367,9 +359,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -384,8 +376,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_request_body** -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - ### Example @@ -419,15 +409,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_combined_with_anyof_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_combined_with_anyof_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -438,9 +428,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_request_body.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -455,8 +445,6 @@ No authorization required # **post_allof_request_body** -> post_allof_request_body(allof) - ### Example @@ -490,15 +478,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -509,9 +497,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_request_body.response_for_200.ApiResponse) | success -#### post_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -526,8 +514,6 @@ No authorization required # **post_allof_simple_types_request_body** -> post_allof_simple_types_request_body(allof_simple_types) - ### Example @@ -561,15 +547,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_simple_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_simple_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -580,9 +566,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_request_body.response_for_200.ApiResponse) | success -#### post_allof_simple_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -597,8 +583,6 @@ No authorization required # **post_allof_with_base_schema_request_body** -> post_allof_with_base_schema_request_body(allof_with_base_schema) - ### Example @@ -632,15 +616,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -651,9 +635,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -668,8 +652,6 @@ No authorization required # **post_allof_with_one_empty_schema_request_body** -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - ### Example @@ -703,15 +685,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -722,9 +704,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -739,8 +721,6 @@ No authorization required # **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 @@ -774,15 +754,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_first_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_first_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -793,9 +773,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -810,8 +790,6 @@ No authorization required # **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 @@ -845,15 +823,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_last_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_last_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -864,9 +842,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -881,8 +859,6 @@ No authorization required # **post_allof_with_two_empty_schemas_request_body** -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - ### Example @@ -916,15 +892,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_two_empty_schemas_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_two_empty_schemas_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -935,9 +911,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -952,8 +928,6 @@ No authorization required # **post_anyof_complex_types_request_body** -> post_anyof_complex_types_request_body(anyof_complex_types) - ### Example @@ -987,15 +961,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1006,9 +980,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1023,8 +997,6 @@ No authorization required # **post_anyof_request_body** -> post_anyof_request_body(anyof) - ### Example @@ -1058,15 +1030,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1077,9 +1049,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_request_body.response_for_200.ApiResponse) | success -#### post_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1094,8 +1066,6 @@ No authorization required # **post_anyof_with_base_schema_request_body** -> post_anyof_with_base_schema_request_body(body) - ### Example @@ -1129,15 +1099,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -1148,9 +1118,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1165,8 +1135,6 @@ No authorization required # **post_anyof_with_one_empty_schema_request_body** -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - ### Example @@ -1200,15 +1168,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -1219,9 +1187,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1236,8 +1204,6 @@ No authorization required # **post_array_type_matches_arrays_request_body** -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - ### Example @@ -1273,15 +1239,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_array_type_matches_arrays_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_array_type_matches_arrays_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -1292,9 +1258,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_request_body.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1309,8 +1275,6 @@ No authorization required # **post_boolean_type_matches_booleans_request_body** -> post_boolean_type_matches_booleans_request_body(body) - ### Example @@ -1344,15 +1308,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_boolean_type_matches_booleans_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_boolean_type_matches_booleans_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -1363,9 +1327,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_request_body.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1380,8 +1344,6 @@ No authorization required # **post_by_int_request_body** -> post_by_int_request_body(body) - ### Example @@ -1415,15 +1377,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_int_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_int_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -1434,9 +1396,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_int_request_body.response_for_200.ApiResponse) | success -#### post_by_int_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1451,8 +1413,6 @@ No authorization required # **post_by_number_request_body** -> post_by_number_request_body(body) - ### Example @@ -1486,15 +1446,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -1505,9 +1465,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_number_request_body.response_for_200.ApiResponse) | success -#### post_by_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1522,8 +1482,6 @@ No authorization required # **post_by_small_number_request_body** -> post_by_small_number_request_body(body) - ### Example @@ -1557,15 +1515,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_small_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_small_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -1576,9 +1534,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_request_body.response_for_200.ApiResponse) | success -#### post_by_small_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1593,8 +1551,6 @@ No authorization required # **post_date_time_format_request_body** -> post_date_time_format_request_body(body) - ### Example @@ -1628,15 +1584,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_date_time_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_date_time_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -1647,9 +1603,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_request_body.response_for_200.ApiResponse) | success -#### post_date_time_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1664,8 +1620,6 @@ No authorization required # **post_email_format_request_body** -> post_email_format_request_body(body) - ### Example @@ -1699,15 +1653,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_email_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_email_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -1718,9 +1672,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_email_format_request_body.response_for_200.ApiResponse) | success -#### post_email_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1735,8 +1689,6 @@ No authorization required # **post_enum_with0_does_not_match_false_request_body** -> post_enum_with0_does_not_match_false_request_body(body) - ### Example @@ -1770,15 +1722,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with0_does_not_match_false_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with0_does_not_match_false_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -1789,9 +1741,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_request_body.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1806,8 +1758,6 @@ No authorization required # **post_enum_with1_does_not_match_true_request_body** -> post_enum_with1_does_not_match_true_request_body(body) - ### Example @@ -1841,15 +1791,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with1_does_not_match_true_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with1_does_not_match_true_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -1860,9 +1810,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_request_body.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1877,8 +1827,6 @@ No authorization required # **post_enum_with_escaped_characters_request_body** -> post_enum_with_escaped_characters_request_body(body) - ### Example @@ -1912,15 +1860,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -1931,9 +1879,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1948,8 +1896,6 @@ No authorization required # **post_enum_with_false_does_not_match0_request_body** -> post_enum_with_false_does_not_match0_request_body(body) - ### Example @@ -1983,15 +1929,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_false_does_not_match0_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_false_does_not_match0_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -2002,9 +1948,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2019,8 +1965,6 @@ No authorization required # **post_enum_with_true_does_not_match1_request_body** -> post_enum_with_true_does_not_match1_request_body(body) - ### Example @@ -2054,15 +1998,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_true_does_not_match1_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_true_does_not_match1_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -2073,9 +2017,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2090,8 +2034,6 @@ No authorization required # **post_enums_in_properties_request_body** -> post_enums_in_properties_request_body(enums_in_properties) - ### Example @@ -2128,15 +2070,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enums_in_properties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enums_in_properties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -2147,9 +2089,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_request_body.response_for_200.ApiResponse) | success -#### post_enums_in_properties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2164,8 +2106,6 @@ No authorization required # **post_forbidden_property_request_body** -> post_forbidden_property_request_body(forbidden_property) - ### Example @@ -2199,15 +2139,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_forbidden_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_forbidden_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -2218,9 +2158,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_request_body.response_for_200.ApiResponse) | success -#### post_forbidden_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2235,8 +2175,6 @@ No authorization required # **post_hostname_format_request_body** -> post_hostname_format_request_body(body) - ### Example @@ -2270,15 +2208,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_hostname_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_hostname_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -2289,9 +2227,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_request_body.response_for_200.ApiResponse) | success -#### post_hostname_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2306,8 +2244,6 @@ No authorization required # **post_integer_type_matches_integers_request_body** -> post_integer_type_matches_integers_request_body(body) - ### Example @@ -2341,15 +2277,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_integer_type_matches_integers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_integer_type_matches_integers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -2360,9 +2296,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_request_body.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2377,8 +2313,6 @@ No authorization required # **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 @@ -2412,15 +2346,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -2431,9 +2365,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2448,8 +2382,6 @@ No authorization required # **post_invalid_string_value_for_default_request_body** -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - ### Example @@ -2483,15 +2415,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_string_value_for_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_string_value_for_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -2502,9 +2434,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_request_body.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2519,8 +2451,6 @@ No authorization required # **post_ipv4_format_request_body** -> post_ipv4_format_request_body(body) - ### Example @@ -2554,15 +2484,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv4_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv4_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -2573,9 +2503,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv4_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2590,8 +2520,6 @@ No authorization required # **post_ipv6_format_request_body** -> post_ipv6_format_request_body(body) - ### Example @@ -2625,15 +2553,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv6_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv6_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -2644,9 +2572,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv6_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2661,8 +2589,6 @@ No authorization required # **post_json_pointer_format_request_body** -> post_json_pointer_format_request_body(body) - ### Example @@ -2696,15 +2622,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_json_pointer_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_json_pointer_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -2715,9 +2641,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_request_body.response_for_200.ApiResponse) | success -#### post_json_pointer_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2732,8 +2658,6 @@ No authorization required # **post_maximum_validation_request_body** -> post_maximum_validation_request_body(body) - ### Example @@ -2767,15 +2691,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -2786,9 +2710,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2803,8 +2727,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_request_body** -> post_maximum_validation_with_unsigned_integer_request_body(body) - ### Example @@ -2838,15 +2760,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -2857,9 +2779,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2874,8 +2796,6 @@ No authorization required # **post_maxitems_validation_request_body** -> post_maxitems_validation_request_body(body) - ### Example @@ -2909,15 +2829,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -2928,9 +2848,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2945,8 +2865,6 @@ No authorization required # **post_maxlength_validation_request_body** -> post_maxlength_validation_request_body(body) - ### Example @@ -2980,15 +2898,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -2999,9 +2917,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3016,8 +2934,6 @@ No authorization required # **post_maxproperties0_means_the_object_is_empty_request_body** -> post_maxproperties0_means_the_object_is_empty_request_body(body) - ### Example @@ -3051,15 +2967,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -3070,9 +2986,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3087,8 +3003,6 @@ No authorization required # **post_maxproperties_validation_request_body** -> post_maxproperties_validation_request_body(body) - ### Example @@ -3122,15 +3036,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -3141,9 +3055,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3158,8 +3072,6 @@ No authorization required # **post_minimum_validation_request_body** -> post_minimum_validation_request_body(body) - ### Example @@ -3193,15 +3105,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -3212,9 +3124,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3229,8 +3141,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_request_body** -> post_minimum_validation_with_signed_integer_request_body(body) - ### Example @@ -3264,15 +3174,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_with_signed_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_with_signed_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -3283,9 +3193,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3300,8 +3210,6 @@ No authorization required # **post_minitems_validation_request_body** -> post_minitems_validation_request_body(body) - ### Example @@ -3335,15 +3243,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -3354,9 +3262,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_minitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3371,8 +3279,6 @@ No authorization required # **post_minlength_validation_request_body** -> post_minlength_validation_request_body(body) - ### Example @@ -3406,15 +3312,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -3425,9 +3331,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_minlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3442,8 +3348,6 @@ No authorization required # **post_minproperties_validation_request_body** -> post_minproperties_validation_request_body(body) - ### Example @@ -3477,15 +3381,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -3496,9 +3400,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_minproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3513,8 +3417,6 @@ No authorization required # **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 @@ -3548,15 +3450,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -3567,9 +3469,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3584,8 +3486,6 @@ No authorization required # **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 @@ -3619,15 +3519,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -3638,9 +3538,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3655,8 +3555,6 @@ No authorization required # **post_nested_items_request_body** -> post_nested_items_request_body(nested_items) - ### Example @@ -3698,15 +3596,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -3717,9 +3615,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_items_request_body.response_for_200.ApiResponse) | success -#### post_nested_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3734,8 +3632,6 @@ No authorization required # **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 @@ -3769,15 +3665,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -3788,9 +3684,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3805,8 +3701,6 @@ No authorization required # **post_not_more_complex_schema_request_body** -> post_not_more_complex_schema_request_body(body) - ### Example @@ -3840,15 +3734,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_more_complex_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_more_complex_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -3859,9 +3753,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_request_body.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3876,8 +3770,6 @@ No authorization required # **post_not_request_body** -> post_not_request_body(body) - ### Example @@ -3911,15 +3803,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -3930,9 +3822,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_request_body.response_for_200.ApiResponse) | success -#### post_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3947,8 +3839,6 @@ No authorization required # **post_nul_characters_in_strings_request_body** -> post_nul_characters_in_strings_request_body(body) - ### Example @@ -3982,15 +3872,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nul_characters_in_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nul_characters_in_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -4001,9 +3891,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_request_body.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4018,8 +3908,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_request_body** -> post_null_type_matches_only_the_null_object_request_body(body) - ### Example @@ -4053,15 +3941,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_null_type_matches_only_the_null_object_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_null_type_matches_only_the_null_object_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -4072,9 +3960,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_request_body.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4089,8 +3977,6 @@ No authorization required # **post_number_type_matches_numbers_request_body** -> post_number_type_matches_numbers_request_body(body) - ### Example @@ -4124,15 +4010,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_number_type_matches_numbers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_number_type_matches_numbers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -4143,9 +4029,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_request_body.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4160,8 +4046,6 @@ No authorization required # **post_object_properties_validation_request_body** -> post_object_properties_validation_request_body(object_properties_validation) - ### Example @@ -4195,15 +4079,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_properties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_properties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -4214,9 +4098,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_request_body.response_for_200.ApiResponse) | success -#### post_object_properties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4231,8 +4115,6 @@ No authorization required # **post_object_type_matches_objects_request_body** -> post_object_type_matches_objects_request_body(body) - ### Example @@ -4266,15 +4148,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_type_matches_objects_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_type_matches_objects_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -4285,9 +4167,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_request_body.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4302,8 +4184,6 @@ No authorization required # **post_oneof_complex_types_request_body** -> post_oneof_complex_types_request_body(oneof_complex_types) - ### Example @@ -4337,15 +4217,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -4356,9 +4236,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4373,8 +4253,6 @@ No authorization required # **post_oneof_request_body** -> post_oneof_request_body(oneof) - ### Example @@ -4408,15 +4286,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -4427,9 +4305,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_request_body.response_for_200.ApiResponse) | success -#### post_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4444,8 +4322,6 @@ No authorization required # **post_oneof_with_base_schema_request_body** -> post_oneof_with_base_schema_request_body(body) - ### Example @@ -4479,15 +4355,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -4498,9 +4374,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4515,8 +4391,6 @@ No authorization required # **post_oneof_with_empty_schema_request_body** -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - ### Example @@ -4550,15 +4424,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -4569,9 +4443,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4586,8 +4460,6 @@ No authorization required # **post_oneof_with_required_request_body** -> post_oneof_with_required_request_body(oneof_with_required) - ### Example @@ -4621,15 +4493,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_required_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_required_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -4640,9 +4512,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_required_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4657,8 +4529,6 @@ No authorization required # **post_pattern_is_not_anchored_request_body** -> post_pattern_is_not_anchored_request_body(body) - ### Example @@ -4692,15 +4562,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_is_not_anchored_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_is_not_anchored_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -4711,9 +4581,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_request_body.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4728,8 +4598,6 @@ No authorization required # **post_pattern_validation_request_body** -> post_pattern_validation_request_body(body) - ### Example @@ -4763,15 +4631,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -4782,9 +4650,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_request_body.response_for_200.ApiResponse) | success -#### post_pattern_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4799,8 +4667,6 @@ No authorization required # **post_properties_with_escaped_characters_request_body** -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - ### Example @@ -4834,15 +4700,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_properties_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_properties_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -4853,9 +4719,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4870,8 +4736,6 @@ No authorization required # **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 @@ -4905,15 +4769,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -4924,9 +4788,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_request_body.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4941,8 +4805,6 @@ No authorization required # **post_ref_in_additionalproperties_request_body** -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - ### Example @@ -4978,15 +4840,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_additionalproperties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_additionalproperties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -4997,9 +4859,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5014,8 +4876,6 @@ No authorization required # **post_ref_in_allof_request_body** -> post_ref_in_allof_request_body(ref_in_allof) - ### Example @@ -5049,15 +4909,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -5068,9 +4928,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5085,8 +4945,6 @@ No authorization required # **post_ref_in_anyof_request_body** -> post_ref_in_anyof_request_body(ref_in_anyof) - ### Example @@ -5120,15 +4978,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -5139,9 +4997,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5156,8 +5014,6 @@ No authorization required # **post_ref_in_items_request_body** -> post_ref_in_items_request_body(ref_in_items) - ### Example @@ -5193,15 +5049,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -5212,9 +5068,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5229,8 +5085,6 @@ No authorization required # **post_ref_in_not_request_body** -> post_ref_in_not_request_body(body) - ### Example @@ -5264,15 +5118,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -5283,9 +5137,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5300,8 +5154,6 @@ No authorization required # **post_ref_in_oneof_request_body** -> post_ref_in_oneof_request_body(ref_in_oneof) - ### Example @@ -5335,15 +5187,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -5354,9 +5206,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5371,8 +5223,6 @@ No authorization required # **post_ref_in_property_request_body** -> post_ref_in_property_request_body(ref_in_property) - ### Example @@ -5406,15 +5256,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -5425,9 +5275,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5442,8 +5292,6 @@ No authorization required # **post_required_default_validation_request_body** -> post_required_default_validation_request_body(required_default_validation) - ### Example @@ -5477,15 +5325,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_default_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_default_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -5496,9 +5344,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_default_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5513,8 +5361,6 @@ No authorization required # **post_required_validation_request_body** -> post_required_validation_request_body(required_validation) - ### Example @@ -5548,15 +5394,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -5567,9 +5413,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5584,8 +5430,6 @@ No authorization required # **post_required_with_empty_array_request_body** -> post_required_with_empty_array_request_body(required_with_empty_array) - ### Example @@ -5619,15 +5463,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_empty_array_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_empty_array_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -5638,9 +5482,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_request_body.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5655,8 +5499,6 @@ No authorization required # **post_required_with_escaped_characters_request_body** -> post_required_with_escaped_characters_request_body(body) - ### Example @@ -5690,15 +5532,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -5709,9 +5551,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5726,8 +5568,6 @@ No authorization required # **post_simple_enum_validation_request_body** -> post_simple_enum_validation_request_body(body) - ### Example @@ -5761,15 +5601,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_simple_enum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_simple_enum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -5780,9 +5620,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_request_body.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5797,8 +5637,6 @@ No authorization required # **post_string_type_matches_strings_request_body** -> post_string_type_matches_strings_request_body(body) - ### Example @@ -5832,15 +5670,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_string_type_matches_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_string_type_matches_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -5851,9 +5689,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_request_body.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5868,8 +5706,6 @@ No authorization required # **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 @@ -5905,15 +5741,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -5924,9 +5760,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5941,8 +5777,6 @@ No authorization required # **post_uniqueitems_false_validation_request_body** -> post_uniqueitems_false_validation_request_body(body) - ### Example @@ -5976,15 +5810,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_false_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_false_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -5995,9 +5829,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6012,8 +5846,6 @@ No authorization required # **post_uniqueitems_validation_request_body** -> post_uniqueitems_validation_request_body(body) - ### Example @@ -6047,15 +5879,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -6066,9 +5898,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6083,8 +5915,6 @@ No authorization required # **post_uri_format_request_body** -> post_uri_format_request_body(body) - ### Example @@ -6118,15 +5948,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -6137,9 +5967,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6154,8 +5984,6 @@ No authorization required # **post_uri_reference_format_request_body** -> post_uri_reference_format_request_body(body) - ### Example @@ -6189,15 +6017,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_reference_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_reference_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -6208,9 +6036,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_reference_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6225,8 +6053,6 @@ No authorization required # **post_uri_template_format_request_body** -> post_uri_template_format_request_body(body) - ### Example @@ -6260,15 +6086,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_template_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_template_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | @@ -6279,9 +6105,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_template_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | 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 index 6a6956c4d7c..0c86c8d0fb8 100644 --- 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 @@ -182,8 +182,6 @@ Method | HTTP request | Description # **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 @@ -220,15 +218,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -239,9 +237,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -256,8 +254,6 @@ No authorization required # **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 @@ -292,16 +288,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -315,8 +311,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_request_body** -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - ### Example @@ -350,15 +344,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_are_allowed_by_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -369,9 +363,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -386,8 +380,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - ### Example @@ -422,16 +414,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -445,8 +437,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_request_body** -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - ### Example @@ -482,15 +472,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_can_exist_by_itself_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -501,9 +491,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -518,8 +508,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - ### Example @@ -554,16 +542,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -577,8 +565,6 @@ No authorization required # **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 @@ -612,15 +598,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_additionalproperties_should_not_look_in_applicators_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -631,9 +617,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_request_body.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -648,8 +634,6 @@ No authorization required # **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 @@ -684,16 +668,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -707,8 +691,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_request_body** -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - ### Example @@ -742,15 +724,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_combined_with_anyof_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_combined_with_anyof_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -761,9 +743,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_request_body.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -778,8 +760,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_response_body_for_content_types** -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - ### Example @@ -814,16 +794,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -837,8 +817,6 @@ No authorization required # **post_allof_request_body** -> post_allof_request_body(allof) - ### Example @@ -872,15 +850,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -891,9 +869,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_request_body.response_for_200.ApiResponse) | success -#### post_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -908,8 +886,6 @@ No authorization required # **post_allof_response_body_for_content_types** -> Allof post_allof_response_body_for_content_types() - ### Example @@ -944,16 +920,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -967,8 +943,6 @@ No authorization required # **post_allof_simple_types_request_body** -> post_allof_simple_types_request_body(allof_simple_types) - ### Example @@ -1002,15 +976,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_simple_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_simple_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1021,9 +995,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_request_body.response_for_200.ApiResponse) | success -#### post_allof_simple_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1038,8 +1012,6 @@ No authorization required # **post_allof_simple_types_response_body_for_content_types** -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - ### Example @@ -1074,16 +1046,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1097,8 +1069,6 @@ No authorization required # **post_allof_with_base_schema_request_body** -> post_allof_with_base_schema_request_body(allof_with_base_schema) - ### Example @@ -1132,15 +1102,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1151,9 +1121,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1168,8 +1138,6 @@ No authorization required # **post_allof_with_base_schema_response_body_for_content_types** -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - ### Example @@ -1204,16 +1172,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1227,8 +1195,6 @@ No authorization required # **post_allof_with_one_empty_schema_request_body** -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - ### Example @@ -1262,15 +1228,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1281,9 +1247,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1298,8 +1264,6 @@ No authorization required # **post_allof_with_one_empty_schema_response_body_for_content_types** -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -1334,16 +1298,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1357,8 +1321,6 @@ No authorization required # **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 @@ -1392,15 +1354,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_first_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_first_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1411,9 +1373,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1428,8 +1390,6 @@ No authorization required # **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 @@ -1464,16 +1424,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1487,8 +1447,6 @@ No authorization required # **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 @@ -1522,15 +1480,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_the_last_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_the_last_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1541,9 +1499,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1558,8 +1516,6 @@ No authorization required # **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 @@ -1594,16 +1550,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1617,8 +1573,6 @@ No authorization required # **post_allof_with_two_empty_schemas_request_body** -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - ### Example @@ -1652,15 +1606,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_allof_with_two_empty_schemas_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_allof_with_two_empty_schemas_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1671,9 +1625,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_request_body.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1688,8 +1642,6 @@ No authorization required # **post_allof_with_two_empty_schemas_response_body_for_content_types** -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - ### Example @@ -1724,16 +1676,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1747,8 +1699,6 @@ No authorization required # **post_anyof_complex_types_request_body** -> post_anyof_complex_types_request_body(anyof_complex_types) - ### Example @@ -1782,15 +1732,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1801,9 +1751,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1818,8 +1768,6 @@ No authorization required # **post_anyof_complex_types_response_body_for_content_types** -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - ### Example @@ -1854,16 +1802,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1877,8 +1825,6 @@ No authorization required # **post_anyof_request_body** -> post_anyof_request_body(anyof) - ### Example @@ -1912,15 +1858,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1931,9 +1877,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_request_body.response_for_200.ApiResponse) | success -#### post_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1948,8 +1894,6 @@ No authorization required # **post_anyof_response_body_for_content_types** -> Anyof post_anyof_response_body_for_content_types() - ### Example @@ -1984,16 +1928,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -2007,8 +1951,6 @@ No authorization required # **post_anyof_with_base_schema_request_body** -> post_anyof_with_base_schema_request_body(body) - ### Example @@ -2042,15 +1984,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2061,9 +2003,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2078,8 +2020,6 @@ No authorization required # **post_anyof_with_base_schema_response_body_for_content_types** -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - ### Example @@ -2114,16 +2054,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2137,8 +2077,6 @@ No authorization required # **post_anyof_with_one_empty_schema_request_body** -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - ### Example @@ -2172,15 +2110,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_anyof_with_one_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_anyof_with_one_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2191,9 +2129,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2208,8 +2146,6 @@ No authorization required # **post_anyof_with_one_empty_schema_response_body_for_content_types** -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -2244,16 +2180,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2267,8 +2203,6 @@ No authorization required # **post_array_type_matches_arrays_request_body** -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - ### Example @@ -2304,15 +2238,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_array_type_matches_arrays_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_array_type_matches_arrays_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2323,9 +2257,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_request_body.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2340,8 +2274,6 @@ No authorization required # **post_array_type_matches_arrays_response_body_for_content_types** -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - ### Example @@ -2376,16 +2308,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2399,8 +2331,6 @@ No authorization required # **post_boolean_type_matches_booleans_request_body** -> post_boolean_type_matches_booleans_request_body(body) - ### Example @@ -2434,15 +2364,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_boolean_type_matches_booleans_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_boolean_type_matches_booleans_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -2453,9 +2383,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_request_body.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2470,8 +2400,6 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() - ### Example @@ -2506,16 +2434,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -2529,8 +2457,6 @@ No authorization required # **post_by_int_request_body** -> post_by_int_request_body(body) - ### Example @@ -2564,15 +2490,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_int_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_int_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2583,9 +2509,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_int_request_body.response_for_200.ApiResponse) | success -#### post_by_int_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2600,8 +2526,6 @@ No authorization required # **post_by_int_response_body_for_content_types** -> ByInt post_by_int_response_body_for_content_types() - ### Example @@ -2636,16 +2560,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_int_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_int_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2659,8 +2583,6 @@ No authorization required # **post_by_number_request_body** -> post_by_number_request_body(body) - ### Example @@ -2694,15 +2616,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2713,9 +2635,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_number_request_body.response_for_200.ApiResponse) | success -#### post_by_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2730,8 +2652,6 @@ No authorization required # **post_by_number_response_body_for_content_types** -> ByNumber post_by_number_response_body_for_content_types() - ### Example @@ -2766,16 +2686,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2789,8 +2709,6 @@ No authorization required # **post_by_small_number_request_body** -> post_by_small_number_request_body(body) - ### Example @@ -2824,15 +2742,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_by_small_number_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_by_small_number_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2843,9 +2761,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_request_body.response_for_200.ApiResponse) | success -#### post_by_small_number_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2860,8 +2778,6 @@ No authorization required # **post_by_small_number_response_body_for_content_types** -> BySmallNumber post_by_small_number_response_body_for_content_types() - ### Example @@ -2896,16 +2812,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2919,8 +2835,6 @@ No authorization required # **post_date_time_format_request_body** -> post_date_time_format_request_body(body) - ### Example @@ -2954,15 +2868,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_date_time_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_date_time_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -2973,9 +2887,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_request_body.response_for_200.ApiResponse) | success -#### post_date_time_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2990,8 +2904,6 @@ No authorization required # **post_date_time_format_response_body_for_content_types** -> DateTimeFormat post_date_time_format_response_body_for_content_types() - ### Example @@ -3026,16 +2938,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -3049,8 +2961,6 @@ No authorization required # **post_email_format_request_body** -> post_email_format_request_body(body) - ### Example @@ -3084,15 +2994,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_email_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_email_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -3103,9 +3013,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_email_format_request_body.response_for_200.ApiResponse) | success -#### post_email_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3120,8 +3030,6 @@ No authorization required # **post_email_format_response_body_for_content_types** -> EmailFormat post_email_format_response_body_for_content_types() - ### Example @@ -3156,16 +3064,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_email_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_email_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -3179,8 +3087,6 @@ No authorization required # **post_enum_with0_does_not_match_false_request_body** -> post_enum_with0_does_not_match_false_request_body(body) - ### Example @@ -3214,15 +3120,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with0_does_not_match_false_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with0_does_not_match_false_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3233,9 +3139,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_request_body.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3250,8 +3156,6 @@ No authorization required # **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 @@ -3286,16 +3190,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3309,8 +3213,6 @@ No authorization required # **post_enum_with1_does_not_match_true_request_body** -> post_enum_with1_does_not_match_true_request_body(body) - ### Example @@ -3344,15 +3246,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with1_does_not_match_true_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with1_does_not_match_true_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3363,9 +3265,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_request_body.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3380,8 +3282,6 @@ No authorization required # **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 @@ -3416,16 +3316,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3439,8 +3339,6 @@ No authorization required # **post_enum_with_escaped_characters_request_body** -> post_enum_with_escaped_characters_request_body(body) - ### Example @@ -3474,15 +3372,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3493,9 +3391,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3510,8 +3408,6 @@ No authorization required # **post_enum_with_escaped_characters_response_body_for_content_types** -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - ### Example @@ -3546,16 +3442,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3569,8 +3465,6 @@ No authorization required # **post_enum_with_false_does_not_match0_request_body** -> post_enum_with_false_does_not_match0_request_body(body) - ### Example @@ -3604,15 +3498,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_false_does_not_match0_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_false_does_not_match0_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3623,9 +3517,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3640,8 +3534,6 @@ No authorization required # **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 @@ -3676,16 +3568,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3699,8 +3591,6 @@ No authorization required # **post_enum_with_true_does_not_match1_request_body** -> post_enum_with_true_does_not_match1_request_body(body) - ### Example @@ -3734,15 +3624,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enum_with_true_does_not_match1_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enum_with_true_does_not_match1_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3753,9 +3643,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_request_body.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3770,8 +3660,6 @@ No authorization required # **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 @@ -3806,16 +3694,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3829,8 +3717,6 @@ No authorization required # **post_enums_in_properties_request_body** -> post_enums_in_properties_request_body(enums_in_properties) - ### Example @@ -3867,15 +3753,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_enums_in_properties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_enums_in_properties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3886,9 +3772,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_request_body.response_for_200.ApiResponse) | success -#### post_enums_in_properties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -3903,8 +3789,6 @@ No authorization required # **post_enums_in_properties_response_body_for_content_types** -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - ### Example @@ -3939,16 +3823,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3962,8 +3846,6 @@ No authorization required # **post_forbidden_property_request_body** -> post_forbidden_property_request_body(forbidden_property) - ### Example @@ -3997,15 +3879,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_forbidden_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_forbidden_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4016,9 +3898,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_request_body.response_for_200.ApiResponse) | success -#### post_forbidden_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4033,8 +3915,6 @@ No authorization required # **post_forbidden_property_response_body_for_content_types** -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - ### Example @@ -4069,16 +3949,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4092,8 +3972,6 @@ No authorization required # **post_hostname_format_request_body** -> post_hostname_format_request_body(body) - ### Example @@ -4127,15 +4005,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_hostname_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_hostname_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -4146,9 +4024,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_request_body.response_for_200.ApiResponse) | success -#### post_hostname_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4163,8 +4041,6 @@ No authorization required # **post_hostname_format_response_body_for_content_types** -> HostnameFormat post_hostname_format_response_body_for_content_types() - ### Example @@ -4199,16 +4075,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -4222,8 +4098,6 @@ No authorization required # **post_integer_type_matches_integers_request_body** -> post_integer_type_matches_integers_request_body(body) - ### Example @@ -4257,15 +4131,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_integer_type_matches_integers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_integer_type_matches_integers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -4276,9 +4150,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_request_body.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4293,8 +4167,6 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() - ### Example @@ -4329,16 +4201,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -4352,8 +4224,6 @@ No authorization required # **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 @@ -4387,15 +4257,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4406,9 +4276,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4423,8 +4293,6 @@ No authorization required # **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 @@ -4459,16 +4327,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4482,8 +4350,6 @@ No authorization required # **post_invalid_string_value_for_default_request_body** -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - ### Example @@ -4517,15 +4383,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_invalid_string_value_for_default_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_invalid_string_value_for_default_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4536,9 +4402,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_request_body.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4553,8 +4419,6 @@ No authorization required # **post_invalid_string_value_for_default_response_body_for_content_types** -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - ### Example @@ -4589,16 +4453,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4612,8 +4476,6 @@ No authorization required # **post_ipv4_format_request_body** -> post_ipv4_format_request_body(body) - ### Example @@ -4647,15 +4509,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv4_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv4_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -4666,9 +4528,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv4_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4683,8 +4545,6 @@ No authorization required # **post_ipv4_format_response_body_for_content_types** -> Ipv4Format post_ipv4_format_response_body_for_content_types() - ### Example @@ -4719,16 +4579,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -4742,8 +4602,6 @@ No authorization required # **post_ipv6_format_request_body** -> post_ipv6_format_request_body(body) - ### Example @@ -4777,15 +4635,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ipv6_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ipv6_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -4796,9 +4654,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_request_body.response_for_200.ApiResponse) | success -#### post_ipv6_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4813,8 +4671,6 @@ No authorization required # **post_ipv6_format_response_body_for_content_types** -> Ipv6Format post_ipv6_format_response_body_for_content_types() - ### Example @@ -4849,16 +4705,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -4872,8 +4728,6 @@ No authorization required # **post_json_pointer_format_request_body** -> post_json_pointer_format_request_body(body) - ### Example @@ -4907,15 +4761,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_json_pointer_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_json_pointer_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -4926,9 +4780,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_request_body.response_for_200.ApiResponse) | success -#### post_json_pointer_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -4943,8 +4797,6 @@ No authorization required # **post_json_pointer_format_response_body_for_content_types** -> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() - ### Example @@ -4979,16 +4831,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -5002,8 +4854,6 @@ No authorization required # **post_maximum_validation_request_body** -> post_maximum_validation_request_body(body) - ### Example @@ -5037,15 +4887,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5056,9 +4906,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5073,8 +4923,6 @@ No authorization required # **post_maximum_validation_response_body_for_content_types** -> MaximumValidation post_maximum_validation_response_body_for_content_types() - ### Example @@ -5109,16 +4957,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5132,8 +4980,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_request_body** -> post_maximum_validation_with_unsigned_integer_request_body(body) - ### Example @@ -5167,15 +5013,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maximum_validation_with_unsigned_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5186,9 +5032,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_request_body.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5203,8 +5049,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - ### Example @@ -5239,16 +5083,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5262,8 +5106,6 @@ No authorization required # **post_maxitems_validation_request_body** -> post_maxitems_validation_request_body(body) - ### Example @@ -5297,15 +5139,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5316,9 +5158,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5333,8 +5175,6 @@ No authorization required # **post_maxitems_validation_response_body_for_content_types** -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - ### Example @@ -5369,16 +5209,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5392,8 +5232,6 @@ No authorization required # **post_maxlength_validation_request_body** -> post_maxlength_validation_request_body(body) - ### Example @@ -5427,15 +5265,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5446,9 +5284,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5463,8 +5301,6 @@ No authorization required # **post_maxlength_validation_response_body_for_content_types** -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - ### Example @@ -5499,16 +5335,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5522,8 +5358,6 @@ No authorization required # **post_maxproperties0_means_the_object_is_empty_request_body** -> post_maxproperties0_means_the_object_is_empty_request_body(body) - ### Example @@ -5557,15 +5391,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties0_means_the_object_is_empty_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5576,9 +5410,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5593,8 +5427,6 @@ No authorization required # **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 @@ -5629,16 +5461,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5652,8 +5484,6 @@ No authorization required # **post_maxproperties_validation_request_body** -> post_maxproperties_validation_request_body(body) - ### Example @@ -5687,15 +5517,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_maxproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_maxproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5706,9 +5536,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5723,8 +5553,6 @@ No authorization required # **post_maxproperties_validation_response_body_for_content_types** -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - ### Example @@ -5759,16 +5587,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5782,8 +5610,6 @@ No authorization required # **post_minimum_validation_request_body** -> post_minimum_validation_request_body(body) - ### Example @@ -5817,15 +5643,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5836,9 +5662,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5853,8 +5679,6 @@ No authorization required # **post_minimum_validation_response_body_for_content_types** -> MinimumValidation post_minimum_validation_response_body_for_content_types() - ### Example @@ -5889,16 +5713,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5912,8 +5736,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_request_body** -> post_minimum_validation_with_signed_integer_request_body(body) - ### Example @@ -5947,15 +5769,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minimum_validation_with_signed_integer_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minimum_validation_with_signed_integer_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -5966,9 +5788,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_request_body.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -5983,8 +5805,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_response_body_for_content_types** -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - ### Example @@ -6019,16 +5839,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -6042,8 +5862,6 @@ No authorization required # **post_minitems_validation_request_body** -> post_minitems_validation_request_body(body) - ### Example @@ -6077,15 +5895,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6096,9 +5914,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_minitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6113,8 +5931,6 @@ No authorization required # **post_minitems_validation_response_body_for_content_types** -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - ### Example @@ -6149,16 +5965,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6172,8 +5988,6 @@ No authorization required # **post_minlength_validation_request_body** -> post_minlength_validation_request_body(body) - ### Example @@ -6207,15 +6021,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minlength_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minlength_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6226,9 +6040,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_request_body.response_for_200.ApiResponse) | success -#### post_minlength_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6243,8 +6057,6 @@ No authorization required # **post_minlength_validation_response_body_for_content_types** -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - ### Example @@ -6279,16 +6091,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6302,8 +6114,6 @@ No authorization required # **post_minproperties_validation_request_body** -> post_minproperties_validation_request_body(body) - ### Example @@ -6337,15 +6147,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_minproperties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_minproperties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6356,9 +6166,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_request_body.response_for_200.ApiResponse) | success -#### post_minproperties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6373,8 +6183,6 @@ No authorization required # **post_minproperties_validation_response_body_for_content_types** -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - ### Example @@ -6409,16 +6217,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6432,8 +6240,6 @@ No authorization required # **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 @@ -6467,15 +6273,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_allof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6486,9 +6292,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6503,8 +6309,6 @@ No authorization required # **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 @@ -6539,16 +6343,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6562,8 +6366,6 @@ No authorization required # **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 @@ -6597,15 +6399,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_anyof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6616,9 +6418,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6633,8 +6435,6 @@ No authorization required # **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 @@ -6669,16 +6469,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6692,8 +6492,6 @@ No authorization required # **post_nested_items_request_body** -> post_nested_items_request_body(nested_items) - ### Example @@ -6735,15 +6533,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6754,9 +6552,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_items_request_body.response_for_200.ApiResponse) | success -#### post_nested_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6771,8 +6569,6 @@ No authorization required # **post_nested_items_response_body_for_content_types** -> NestedItems post_nested_items_response_body_for_content_types() - ### Example @@ -6807,16 +6603,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6830,8 +6626,6 @@ No authorization required # **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 @@ -6865,15 +6659,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nested_oneof_to_check_validation_semantics_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6884,9 +6678,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_request_body.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -6901,8 +6695,6 @@ No authorization required # **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 @@ -6937,16 +6729,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6960,8 +6752,6 @@ No authorization required # **post_not_more_complex_schema_request_body** -> post_not_more_complex_schema_request_body(body) - ### Example @@ -6995,15 +6785,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_more_complex_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_more_complex_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -7014,9 +6804,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_request_body.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7031,8 +6821,6 @@ No authorization required # **post_not_more_complex_schema_response_body_for_content_types** -> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() - ### Example @@ -7067,16 +6855,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -7090,8 +6878,6 @@ No authorization required # **post_not_request_body** -> post_not_request_body(body) - ### Example @@ -7125,15 +6911,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -7144,9 +6930,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_not_request_body.response_for_200.ApiResponse) | success -#### post_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7161,8 +6947,6 @@ No authorization required # **post_not_response_body_for_content_types** -> ModelNot post_not_response_body_for_content_types() - ### Example @@ -7197,16 +6981,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -7220,8 +7004,6 @@ No authorization required # **post_nul_characters_in_strings_request_body** -> post_nul_characters_in_strings_request_body(body) - ### Example @@ -7255,15 +7037,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_nul_characters_in_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_nul_characters_in_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7274,9 +7056,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_request_body.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7291,8 +7073,6 @@ No authorization required # **post_nul_characters_in_strings_response_body_for_content_types** -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - ### Example @@ -7327,16 +7107,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7350,8 +7130,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_request_body** -> post_null_type_matches_only_the_null_object_request_body(body) - ### Example @@ -7385,15 +7163,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_null_type_matches_only_the_null_object_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_null_type_matches_only_the_null_object_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -7404,9 +7182,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_request_body.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7421,8 +7199,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_response_body_for_content_types** -> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() - ### Example @@ -7457,16 +7233,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -7480,8 +7256,6 @@ No authorization required # **post_number_type_matches_numbers_request_body** -> post_number_type_matches_numbers_request_body(body) - ### Example @@ -7515,15 +7289,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_number_type_matches_numbers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_number_type_matches_numbers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -7534,9 +7308,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_request_body.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7551,8 +7325,6 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() - ### Example @@ -7587,16 +7359,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -7610,8 +7382,6 @@ No authorization required # **post_object_properties_validation_request_body** -> post_object_properties_validation_request_body(object_properties_validation) - ### Example @@ -7645,15 +7415,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_properties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_properties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7664,9 +7434,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_request_body.response_for_200.ApiResponse) | success -#### post_object_properties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7681,8 +7451,6 @@ No authorization required # **post_object_properties_validation_response_body_for_content_types** -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - ### Example @@ -7717,16 +7485,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7740,8 +7508,6 @@ No authorization required # **post_object_type_matches_objects_request_body** -> post_object_type_matches_objects_request_body(body) - ### Example @@ -7775,15 +7541,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_type_matches_objects_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_type_matches_objects_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -7794,9 +7560,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_request_body.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7811,8 +7577,6 @@ No authorization required # **post_object_type_matches_objects_response_body_for_content_types** -> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() - ### Example @@ -7847,16 +7611,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -7870,8 +7634,6 @@ No authorization required # **post_oneof_complex_types_request_body** -> post_oneof_complex_types_request_body(oneof_complex_types) - ### Example @@ -7905,15 +7667,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_complex_types_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_complex_types_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -7924,9 +7686,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_request_body.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -7941,8 +7703,6 @@ No authorization required # **post_oneof_complex_types_response_body_for_content_types** -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - ### Example @@ -7977,16 +7737,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -8000,8 +7760,6 @@ No authorization required # **post_oneof_request_body** -> post_oneof_request_body(oneof) - ### Example @@ -8035,15 +7793,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8054,9 +7812,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_request_body.response_for_200.ApiResponse) | success -#### post_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8071,8 +7829,6 @@ No authorization required # **post_oneof_response_body_for_content_types** -> Oneof post_oneof_response_body_for_content_types() - ### Example @@ -8107,16 +7863,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -8130,8 +7886,6 @@ No authorization required # **post_oneof_with_base_schema_request_body** -> post_oneof_with_base_schema_request_body(body) - ### Example @@ -8165,15 +7919,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_base_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_base_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8184,9 +7938,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8201,8 +7955,6 @@ No authorization required # **post_oneof_with_base_schema_response_body_for_content_types** -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - ### Example @@ -8237,16 +7989,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8260,8 +8012,6 @@ No authorization required # **post_oneof_with_empty_schema_request_body** -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - ### Example @@ -8295,15 +8045,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_empty_schema_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_empty_schema_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8314,9 +8064,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8331,8 +8081,6 @@ No authorization required # **post_oneof_with_empty_schema_response_body_for_content_types** -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - ### Example @@ -8367,16 +8115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8390,8 +8138,6 @@ No authorization required # **post_oneof_with_required_request_body** -> post_oneof_with_required_request_body(oneof_with_required) - ### Example @@ -8425,15 +8171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_oneof_with_required_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_oneof_with_required_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8444,9 +8190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_request_body.response_for_200.ApiResponse) | success -#### post_oneof_with_required_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8461,8 +8207,6 @@ No authorization required # **post_oneof_with_required_response_body_for_content_types** -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - ### Example @@ -8497,16 +8241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8520,8 +8264,6 @@ No authorization required # **post_pattern_is_not_anchored_request_body** -> post_pattern_is_not_anchored_request_body(body) - ### Example @@ -8555,15 +8297,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_is_not_anchored_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_is_not_anchored_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8574,9 +8316,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_request_body.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8591,8 +8333,6 @@ No authorization required # **post_pattern_is_not_anchored_response_body_for_content_types** -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - ### Example @@ -8627,16 +8367,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8650,8 +8390,6 @@ No authorization required # **post_pattern_validation_request_body** -> post_pattern_validation_request_body(body) - ### Example @@ -8685,15 +8423,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8704,9 +8442,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_request_body.response_for_200.ApiResponse) | success -#### post_pattern_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8721,8 +8459,6 @@ No authorization required # **post_pattern_validation_response_body_for_content_types** -> PatternValidation post_pattern_validation_response_body_for_content_types() - ### Example @@ -8757,16 +8493,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8780,8 +8516,6 @@ No authorization required # **post_properties_with_escaped_characters_request_body** -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - ### Example @@ -8815,15 +8549,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_properties_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_properties_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8834,9 +8568,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8851,8 +8585,6 @@ No authorization required # **post_properties_with_escaped_characters_response_body_for_content_types** -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - ### Example @@ -8887,16 +8619,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8910,8 +8642,6 @@ No authorization required # **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 @@ -8945,15 +8675,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -8964,9 +8694,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_request_body.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -8981,8 +8711,6 @@ No authorization required # **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 @@ -9017,16 +8745,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -9040,8 +8768,6 @@ No authorization required # **post_ref_in_additionalproperties_request_body** -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - ### Example @@ -9077,15 +8803,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_additionalproperties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_additionalproperties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9096,9 +8822,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9113,8 +8839,6 @@ No authorization required # **post_ref_in_additionalproperties_response_body_for_content_types** -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - ### Example @@ -9149,16 +8873,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9172,8 +8896,6 @@ No authorization required # **post_ref_in_allof_request_body** -> post_ref_in_allof_request_body(ref_in_allof) - ### Example @@ -9207,15 +8929,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9226,9 +8948,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9243,8 +8965,6 @@ No authorization required # **post_ref_in_allof_response_body_for_content_types** -> RefInAllof post_ref_in_allof_response_body_for_content_types() - ### Example @@ -9279,16 +8999,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9302,8 +9022,6 @@ No authorization required # **post_ref_in_anyof_request_body** -> post_ref_in_anyof_request_body(ref_in_anyof) - ### Example @@ -9337,15 +9055,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9356,9 +9074,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9373,8 +9091,6 @@ No authorization required # **post_ref_in_anyof_response_body_for_content_types** -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - ### Example @@ -9409,16 +9125,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9432,8 +9148,6 @@ No authorization required # **post_ref_in_items_request_body** -> post_ref_in_items_request_body(ref_in_items) - ### Example @@ -9469,15 +9183,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9488,9 +9202,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9505,8 +9219,6 @@ No authorization required # **post_ref_in_items_response_body_for_content_types** -> RefInItems post_ref_in_items_response_body_for_content_types() - ### Example @@ -9541,16 +9253,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9564,8 +9276,6 @@ No authorization required # **post_ref_in_not_request_body** -> post_ref_in_not_request_body(body) - ### Example @@ -9599,15 +9309,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -9618,9 +9328,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9635,8 +9345,6 @@ No authorization required # **post_ref_in_not_response_body_for_content_types** -> RefInNot post_ref_in_not_response_body_for_content_types() - ### Example @@ -9671,16 +9379,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -9694,8 +9402,6 @@ No authorization required # **post_ref_in_oneof_request_body** -> post_ref_in_oneof_request_body(ref_in_oneof) - ### Example @@ -9729,15 +9435,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9748,9 +9454,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9765,8 +9471,6 @@ No authorization required # **post_ref_in_oneof_response_body_for_content_types** -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - ### Example @@ -9801,16 +9505,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9824,8 +9528,6 @@ No authorization required # **post_ref_in_property_request_body** -> post_ref_in_property_request_body(ref_in_property) - ### Example @@ -9859,15 +9561,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -9878,9 +9580,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -9895,8 +9597,6 @@ No authorization required # **post_ref_in_property_response_body_for_content_types** -> RefInProperty post_ref_in_property_response_body_for_content_types() - ### Example @@ -9931,16 +9631,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -9954,8 +9654,6 @@ No authorization required # **post_required_default_validation_request_body** -> post_required_default_validation_request_body(required_default_validation) - ### Example @@ -9989,15 +9687,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_default_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_default_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10008,9 +9706,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_default_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10025,8 +9723,6 @@ No authorization required # **post_required_default_validation_response_body_for_content_types** -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - ### Example @@ -10061,16 +9757,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -10084,8 +9780,6 @@ No authorization required # **post_required_validation_request_body** -> post_required_validation_request_body(required_validation) - ### Example @@ -10119,15 +9813,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10138,9 +9832,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10155,8 +9849,6 @@ No authorization required # **post_required_validation_response_body_for_content_types** -> RequiredValidation post_required_validation_response_body_for_content_types() - ### Example @@ -10191,16 +9883,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10214,8 +9906,6 @@ No authorization required # **post_required_with_empty_array_request_body** -> post_required_with_empty_array_request_body(required_with_empty_array) - ### Example @@ -10249,15 +9939,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_empty_array_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_empty_array_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10268,9 +9958,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_request_body.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10285,8 +9975,6 @@ No authorization required # **post_required_with_empty_array_response_body_for_content_types** -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - ### Example @@ -10321,16 +10009,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10344,8 +10032,6 @@ No authorization required # **post_required_with_escaped_characters_request_body** -> post_required_with_escaped_characters_request_body(body) - ### Example @@ -10379,15 +10065,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -10398,9 +10084,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10415,8 +10101,6 @@ No authorization required # **post_required_with_escaped_characters_response_body_for_content_types** -> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() - ### Example @@ -10451,16 +10135,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -10474,8 +10158,6 @@ No authorization required # **post_simple_enum_validation_request_body** -> post_simple_enum_validation_request_body(body) - ### Example @@ -10509,15 +10191,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_simple_enum_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_simple_enum_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10528,9 +10210,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_request_body.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10545,8 +10227,6 @@ No authorization required # **post_simple_enum_validation_response_body_for_content_types** -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - ### Example @@ -10581,16 +10261,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10604,8 +10284,6 @@ No authorization required # **post_string_type_matches_strings_request_body** -> post_string_type_matches_strings_request_body(body) - ### Example @@ -10639,15 +10317,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_string_type_matches_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_string_type_matches_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -10658,9 +10336,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_request_body.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10675,8 +10353,6 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() - ### Example @@ -10711,16 +10387,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -10734,8 +10410,6 @@ No authorization required # **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 @@ -10771,15 +10445,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10790,9 +10464,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10807,8 +10481,6 @@ No authorization required # **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 @@ -10843,16 +10515,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10866,8 +10538,6 @@ No authorization required # **post_uniqueitems_false_validation_request_body** -> post_uniqueitems_false_validation_request_body(body) - ### Example @@ -10901,15 +10571,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_false_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_false_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -10920,9 +10590,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -10937,8 +10607,6 @@ No authorization required # **post_uniqueitems_false_validation_response_body_for_content_types** -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - ### Example @@ -10973,16 +10641,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -10996,8 +10664,6 @@ No authorization required # **post_uniqueitems_validation_request_body** -> post_uniqueitems_validation_request_body(body) - ### Example @@ -11031,15 +10697,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11050,9 +10716,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11067,8 +10733,6 @@ No authorization required # **post_uniqueitems_validation_response_body_for_content_types** -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - ### Example @@ -11103,16 +10767,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -11126,8 +10790,6 @@ No authorization required # **post_uri_format_request_body** -> post_uri_format_request_body(body) - ### Example @@ -11161,15 +10823,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -11180,9 +10842,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11197,8 +10859,6 @@ No authorization required # **post_uri_format_response_body_for_content_types** -> UriFormat post_uri_format_response_body_for_content_types() - ### Example @@ -11233,16 +10893,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -11256,8 +10916,6 @@ No authorization required # **post_uri_reference_format_request_body** -> post_uri_reference_format_request_body(body) - ### Example @@ -11291,15 +10949,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_reference_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_reference_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -11310,9 +10968,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_reference_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11327,8 +10985,6 @@ No authorization required # **post_uri_reference_format_response_body_for_content_types** -> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() - ### Example @@ -11363,16 +11019,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -11386,8 +11042,6 @@ No authorization required # **post_uri_template_format_request_body** -> post_uri_template_format_request_body(body) - ### Example @@ -11421,15 +11075,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uri_template_format_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uri_template_format_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.md) | | @@ -11440,9 +11094,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_request_body.response_for_200.ApiResponse) | success -#### post_uri_template_format_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -11457,8 +11111,6 @@ No authorization required # **post_uri_template_format_response_body_for_content_types** -> UriTemplateFormat post_uri_template_format_response_body_for_content_types() - ### Example @@ -11493,16 +11145,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.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 index c8429c385b8..704a207b6ba 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_pattern_is_not_anchored_request_body** -> post_pattern_is_not_anchored_request_body(body) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_is_not_anchored_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_is_not_anchored_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_request_body.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **post_pattern_is_not_anchored_response_body_for_content_types** -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - ### Example @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -142,8 +138,6 @@ No authorization required # **post_pattern_validation_request_body** -> post_pattern_validation_request_body(body) - ### Example @@ -177,15 +171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_pattern_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_pattern_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -196,9 +190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_request_body.response_for_200.ApiResponse) | success -#### post_pattern_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -213,8 +207,6 @@ No authorization required # **post_pattern_validation_response_body_for_content_types** -> PatternValidation post_pattern_validation_response_body_for_content_types() - ### Example @@ -249,16 +241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.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 index d69d8fcf34e..9d036c56572 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_object_properties_validation_request_body** -> post_object_properties_validation_request_body(object_properties_validation) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_properties_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_properties_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_request_body.response_for_200.ApiResponse) | success -#### post_object_properties_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **post_object_properties_validation_response_body_for_content_types** -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - ### Example @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -142,8 +138,6 @@ No authorization required # **post_properties_with_escaped_characters_request_body** -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - ### Example @@ -177,15 +171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_properties_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_properties_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -196,9 +190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -213,8 +207,6 @@ No authorization required # **post_properties_with_escaped_characters_response_body_for_content_types** -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - ### Example @@ -249,16 +241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.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 index 7ab575688e1..bf1cdcda6f7 100644 --- 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 @@ -24,8 +24,6 @@ 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(property_named_ref_that_is_not_a_reference) - ### Example @@ -59,15 +57,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_property_named_ref_that_is_not_a_reference_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -78,9 +76,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_request_body.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -95,8 +93,6 @@ No authorization required # **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 @@ -131,16 +127,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -154,8 +150,6 @@ No authorization required # **post_ref_in_additionalproperties_request_body** -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - ### Example @@ -191,15 +185,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_additionalproperties_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_additionalproperties_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -210,9 +204,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -227,8 +221,6 @@ No authorization required # **post_ref_in_additionalproperties_response_body_for_content_types** -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - ### Example @@ -263,16 +255,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -286,8 +278,6 @@ No authorization required # **post_ref_in_allof_request_body** -> post_ref_in_allof_request_body(ref_in_allof) - ### Example @@ -321,15 +311,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_allof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_allof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -340,9 +330,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_allof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -357,8 +347,6 @@ No authorization required # **post_ref_in_allof_response_body_for_content_types** -> RefInAllof post_ref_in_allof_response_body_for_content_types() - ### Example @@ -393,16 +381,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -416,8 +404,6 @@ No authorization required # **post_ref_in_anyof_request_body** -> post_ref_in_anyof_request_body(ref_in_anyof) - ### Example @@ -451,15 +437,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_anyof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_anyof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -470,9 +456,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -487,8 +473,6 @@ No authorization required # **post_ref_in_anyof_response_body_for_content_types** -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - ### Example @@ -523,16 +507,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -546,8 +530,6 @@ No authorization required # **post_ref_in_items_request_body** -> post_ref_in_items_request_body(ref_in_items) - ### Example @@ -583,15 +565,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_items_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_items_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -602,9 +584,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_items_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -619,8 +601,6 @@ No authorization required # **post_ref_in_items_response_body_for_content_types** -> RefInItems post_ref_in_items_response_body_for_content_types() - ### Example @@ -655,16 +635,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -678,8 +658,6 @@ No authorization required # **post_ref_in_not_request_body** -> post_ref_in_not_request_body(body) - ### Example @@ -713,15 +691,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_not_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_not_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -732,9 +710,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_not_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -749,8 +727,6 @@ No authorization required # **post_ref_in_not_response_body_for_content_types** -> RefInNot post_ref_in_not_response_body_for_content_types() - ### Example @@ -785,16 +761,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -808,8 +784,6 @@ No authorization required # **post_ref_in_oneof_request_body** -> post_ref_in_oneof_request_body(ref_in_oneof) - ### Example @@ -843,15 +817,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_oneof_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_oneof_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -862,9 +836,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -879,8 +853,6 @@ No authorization required # **post_ref_in_oneof_response_body_for_content_types** -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - ### Example @@ -915,16 +887,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -938,8 +910,6 @@ No authorization required # **post_ref_in_property_request_body** -> post_ref_in_property_request_body(ref_in_property) - ### Example @@ -973,15 +943,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_ref_in_property_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_ref_in_property_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -992,9 +962,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_request_body.response_for_200.ApiResponse) | success -#### post_ref_in_property_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1009,8 +979,6 @@ No authorization required # **post_ref_in_property_response_body_for_content_types** -> RefInProperty post_ref_in_property_response_body_for_content_types() - ### Example @@ -1045,16 +1013,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.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 index 6fe86d35ce4..47eff4b8c19 100644 --- 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 @@ -16,8 +16,6 @@ Method | HTTP request | Description # **post_required_default_validation_request_body** -> post_required_default_validation_request_body(required_default_validation) - ### Example @@ -51,15 +49,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_default_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_default_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -70,9 +68,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_default_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -87,8 +85,6 @@ No authorization required # **post_required_default_validation_response_body_for_content_types** -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - ### Example @@ -123,16 +119,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -146,8 +142,6 @@ No authorization required # **post_required_validation_request_body** -> post_required_validation_request_body(required_validation) - ### Example @@ -181,15 +175,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -200,9 +194,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_validation_request_body.response_for_200.ApiResponse) | success -#### post_required_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -217,8 +211,6 @@ No authorization required # **post_required_validation_response_body_for_content_types** -> RequiredValidation post_required_validation_response_body_for_content_types() - ### Example @@ -253,16 +245,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -276,8 +268,6 @@ No authorization required # **post_required_with_empty_array_request_body** -> post_required_with_empty_array_request_body(required_with_empty_array) - ### Example @@ -311,15 +301,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_empty_array_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_empty_array_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -330,9 +320,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_request_body.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -347,8 +337,6 @@ No authorization required # **post_required_with_empty_array_response_body_for_content_types** -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - ### Example @@ -383,16 +371,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -406,8 +394,6 @@ No authorization required # **post_required_with_escaped_characters_request_body** -> post_required_with_escaped_characters_request_body(body) - ### Example @@ -441,15 +427,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_required_with_escaped_characters_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_required_with_escaped_characters_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -460,9 +446,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_request_body.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -477,8 +463,6 @@ No authorization required # **post_required_with_escaped_characters_response_body_for_content_types** -> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() - ### Example @@ -513,16 +497,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.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 index 844561c3b32..d1fdf699313 100644 --- 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 @@ -95,8 +95,6 @@ Method | HTTP request | Description # **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 @@ -131,16 +129,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -154,8 +152,6 @@ No authorization required # **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - ### Example @@ -190,16 +186,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -213,8 +209,6 @@ No authorization required # **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - ### Example @@ -249,16 +243,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -272,8 +266,6 @@ No authorization required # **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 @@ -308,16 +300,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -331,8 +323,6 @@ No authorization required # **post_allof_combined_with_anyof_oneof_response_body_for_content_types** -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - ### Example @@ -367,16 +357,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -390,8 +380,6 @@ No authorization required # **post_allof_response_body_for_content_types** -> Allof post_allof_response_body_for_content_types() - ### Example @@ -426,16 +414,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -449,8 +437,6 @@ No authorization required # **post_allof_simple_types_response_body_for_content_types** -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - ### Example @@ -485,16 +471,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_simple_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -508,8 +494,6 @@ No authorization required # **post_allof_with_base_schema_response_body_for_content_types** -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - ### Example @@ -544,16 +528,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -567,8 +551,6 @@ No authorization required # **post_allof_with_one_empty_schema_response_body_for_content_types** -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -603,16 +585,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -626,8 +608,6 @@ No authorization required # **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 @@ -662,16 +642,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -685,8 +665,6 @@ No authorization required # **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 @@ -721,16 +699,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -744,8 +722,6 @@ No authorization required # **post_allof_with_two_empty_schemas_response_body_for_content_types** -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - ### Example @@ -780,16 +756,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -803,8 +779,6 @@ No authorization required # **post_anyof_complex_types_response_body_for_content_types** -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - ### Example @@ -839,16 +813,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -862,8 +836,6 @@ No authorization required # **post_anyof_response_body_for_content_types** -> Anyof post_anyof_response_body_for_content_types() - ### Example @@ -898,16 +870,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -921,8 +893,6 @@ No authorization required # **post_anyof_with_base_schema_response_body_for_content_types** -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - ### Example @@ -957,16 +927,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -980,8 +950,6 @@ No authorization required # **post_anyof_with_one_empty_schema_response_body_for_content_types** -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - ### Example @@ -1016,16 +984,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -1039,8 +1007,6 @@ No authorization required # **post_array_type_matches_arrays_response_body_for_content_types** -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - ### Example @@ -1075,16 +1041,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -1098,8 +1064,6 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() - ### Example @@ -1134,16 +1098,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -1157,8 +1121,6 @@ No authorization required # **post_by_int_response_body_for_content_types** -> ByInt post_by_int_response_body_for_content_types() - ### Example @@ -1193,16 +1155,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_int_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_int_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -1216,8 +1178,6 @@ No authorization required # **post_by_number_response_body_for_content_types** -> ByNumber post_by_number_response_body_for_content_types() - ### Example @@ -1252,16 +1212,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -1275,8 +1235,6 @@ No authorization required # **post_by_small_number_response_body_for_content_types** -> BySmallNumber post_by_small_number_response_body_for_content_types() - ### Example @@ -1311,16 +1269,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_by_small_number_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -1334,8 +1292,6 @@ No authorization required # **post_date_time_format_response_body_for_content_types** -> DateTimeFormat post_date_time_format_response_body_for_content_types() - ### Example @@ -1370,16 +1326,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_date_time_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -1393,8 +1349,6 @@ No authorization required # **post_email_format_response_body_for_content_types** -> EmailFormat post_email_format_response_body_for_content_types() - ### Example @@ -1429,16 +1383,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_email_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_email_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -1452,8 +1406,6 @@ No authorization required # **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 @@ -1488,16 +1440,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -1511,8 +1463,6 @@ No authorization required # **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 @@ -1547,16 +1497,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -1570,8 +1520,6 @@ No authorization required # **post_enum_with_escaped_characters_response_body_for_content_types** -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - ### Example @@ -1606,16 +1554,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -1629,8 +1577,6 @@ No authorization required # **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 @@ -1665,16 +1611,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -1688,8 +1634,6 @@ No authorization required # **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 @@ -1724,16 +1668,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -1747,8 +1691,6 @@ No authorization required # **post_enums_in_properties_response_body_for_content_types** -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - ### Example @@ -1783,16 +1725,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_enums_in_properties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -1806,8 +1748,6 @@ No authorization required # **post_forbidden_property_response_body_for_content_types** -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - ### Example @@ -1842,16 +1782,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_forbidden_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -1865,8 +1805,6 @@ No authorization required # **post_hostname_format_response_body_for_content_types** -> HostnameFormat post_hostname_format_response_body_for_content_types() - ### Example @@ -1901,16 +1839,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_hostname_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -1924,8 +1862,6 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() - ### Example @@ -1960,16 +1896,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -1983,8 +1919,6 @@ No authorization required # **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 @@ -2019,16 +1953,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -2042,8 +1976,6 @@ No authorization required # **post_invalid_string_value_for_default_response_body_for_content_types** -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - ### Example @@ -2078,16 +2010,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -2101,8 +2033,6 @@ No authorization required # **post_ipv4_format_response_body_for_content_types** -> Ipv4Format post_ipv4_format_response_body_for_content_types() - ### Example @@ -2137,16 +2067,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv4_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -2160,8 +2090,6 @@ No authorization required # **post_ipv6_format_response_body_for_content_types** -> Ipv6Format post_ipv6_format_response_body_for_content_types() - ### Example @@ -2196,16 +2124,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ipv6_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -2219,8 +2147,6 @@ No authorization required # **post_json_pointer_format_response_body_for_content_types** -> JsonPointerFormat post_json_pointer_format_response_body_for_content_types() - ### Example @@ -2255,16 +2181,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_json_pointer_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -2278,8 +2204,6 @@ No authorization required # **post_maximum_validation_response_body_for_content_types** -> MaximumValidation post_maximum_validation_response_body_for_content_types() - ### Example @@ -2314,16 +2238,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -2337,8 +2261,6 @@ No authorization required # **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - ### Example @@ -2373,16 +2295,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -2396,8 +2318,6 @@ No authorization required # **post_maxitems_validation_response_body_for_content_types** -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - ### Example @@ -2432,16 +2352,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -2455,8 +2375,6 @@ No authorization required # **post_maxlength_validation_response_body_for_content_types** -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - ### Example @@ -2491,16 +2409,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -2514,8 +2432,6 @@ No authorization required # **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 @@ -2550,16 +2466,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -2573,8 +2489,6 @@ No authorization required # **post_maxproperties_validation_response_body_for_content_types** -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - ### Example @@ -2609,16 +2523,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_maxproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -2632,8 +2546,6 @@ No authorization required # **post_minimum_validation_response_body_for_content_types** -> MinimumValidation post_minimum_validation_response_body_for_content_types() - ### Example @@ -2668,16 +2580,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -2691,8 +2603,6 @@ No authorization required # **post_minimum_validation_with_signed_integer_response_body_for_content_types** -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - ### Example @@ -2727,16 +2637,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -2750,8 +2660,6 @@ No authorization required # **post_minitems_validation_response_body_for_content_types** -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - ### Example @@ -2786,16 +2694,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -2809,8 +2717,6 @@ No authorization required # **post_minlength_validation_response_body_for_content_types** -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - ### Example @@ -2845,16 +2751,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minlength_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -2868,8 +2774,6 @@ No authorization required # **post_minproperties_validation_response_body_for_content_types** -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - ### Example @@ -2904,16 +2808,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_minproperties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -2927,8 +2831,6 @@ No authorization required # **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 @@ -2963,16 +2865,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -2986,8 +2888,6 @@ No authorization required # **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 @@ -3022,16 +2922,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -3045,8 +2945,6 @@ No authorization required # **post_nested_items_response_body_for_content_types** -> NestedItems post_nested_items_response_body_for_content_types() - ### Example @@ -3081,16 +2979,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -3104,8 +3002,6 @@ No authorization required # **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 @@ -3140,16 +3036,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -3163,8 +3059,6 @@ No authorization required # **post_not_more_complex_schema_response_body_for_content_types** -> NotMoreComplexSchema post_not_more_complex_schema_response_body_for_content_types() - ### Example @@ -3199,16 +3093,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -3222,8 +3116,6 @@ No authorization required # **post_not_response_body_for_content_types** -> ModelNot post_not_response_body_for_content_types() - ### Example @@ -3258,16 +3150,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -3281,8 +3173,6 @@ No authorization required # **post_nul_characters_in_strings_response_body_for_content_types** -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - ### Example @@ -3317,16 +3207,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -3340,8 +3230,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_response_body_for_content_types** -> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() - ### Example @@ -3376,16 +3264,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -3399,8 +3287,6 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() - ### Example @@ -3435,16 +3321,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -3458,8 +3344,6 @@ No authorization required # **post_object_properties_validation_response_body_for_content_types** -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - ### Example @@ -3494,16 +3378,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_properties_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -3517,8 +3401,6 @@ No authorization required # **post_object_type_matches_objects_response_body_for_content_types** -> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() - ### Example @@ -3553,16 +3435,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -3576,8 +3458,6 @@ No authorization required # **post_oneof_complex_types_response_body_for_content_types** -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - ### Example @@ -3612,16 +3492,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_complex_types_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -3635,8 +3515,6 @@ No authorization required # **post_oneof_response_body_for_content_types** -> Oneof post_oneof_response_body_for_content_types() - ### Example @@ -3671,16 +3549,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -3694,8 +3572,6 @@ No authorization required # **post_oneof_with_base_schema_response_body_for_content_types** -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - ### Example @@ -3730,16 +3606,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -3753,8 +3629,6 @@ No authorization required # **post_oneof_with_empty_schema_response_body_for_content_types** -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - ### Example @@ -3789,16 +3663,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -3812,8 +3686,6 @@ No authorization required # **post_oneof_with_required_response_body_for_content_types** -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - ### Example @@ -3848,16 +3720,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_oneof_with_required_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -3871,8 +3743,6 @@ No authorization required # **post_pattern_is_not_anchored_response_body_for_content_types** -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - ### Example @@ -3907,16 +3777,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -3930,8 +3800,6 @@ No authorization required # **post_pattern_validation_response_body_for_content_types** -> PatternValidation post_pattern_validation_response_body_for_content_types() - ### Example @@ -3966,16 +3834,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_pattern_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -3989,8 +3857,6 @@ No authorization required # **post_properties_with_escaped_characters_response_body_for_content_types** -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - ### Example @@ -4025,16 +3891,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -4048,8 +3914,6 @@ No authorization required # **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 @@ -4084,16 +3948,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -4107,8 +3971,6 @@ No authorization required # **post_ref_in_additionalproperties_response_body_for_content_types** -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - ### Example @@ -4143,16 +4005,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -4166,8 +4028,6 @@ No authorization required # **post_ref_in_allof_response_body_for_content_types** -> RefInAllof post_ref_in_allof_response_body_for_content_types() - ### Example @@ -4202,16 +4062,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_allof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -4225,8 +4085,6 @@ No authorization required # **post_ref_in_anyof_response_body_for_content_types** -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - ### Example @@ -4261,16 +4119,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_anyof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -4284,8 +4142,6 @@ No authorization required # **post_ref_in_items_response_body_for_content_types** -> RefInItems post_ref_in_items_response_body_for_content_types() - ### Example @@ -4320,16 +4176,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_items_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -4343,8 +4199,6 @@ No authorization required # **post_ref_in_not_response_body_for_content_types** -> RefInNot post_ref_in_not_response_body_for_content_types() - ### Example @@ -4379,16 +4233,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_not_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -4402,8 +4256,6 @@ No authorization required # **post_ref_in_oneof_response_body_for_content_types** -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - ### Example @@ -4438,16 +4290,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_oneof_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -4461,8 +4313,6 @@ No authorization required # **post_ref_in_property_response_body_for_content_types** -> RefInProperty post_ref_in_property_response_body_for_content_types() - ### Example @@ -4497,16 +4347,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_ref_in_property_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -4520,8 +4370,6 @@ No authorization required # **post_required_default_validation_response_body_for_content_types** -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - ### Example @@ -4556,16 +4404,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_default_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -4579,8 +4427,6 @@ No authorization required # **post_required_validation_response_body_for_content_types** -> RequiredValidation post_required_validation_response_body_for_content_types() - ### Example @@ -4615,16 +4461,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -4638,8 +4484,6 @@ No authorization required # **post_required_with_empty_array_response_body_for_content_types** -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - ### Example @@ -4674,16 +4518,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_empty_array_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -4697,8 +4541,6 @@ No authorization required # **post_required_with_escaped_characters_response_body_for_content_types** -> RequiredWithEscapedCharacters post_required_with_escaped_characters_response_body_for_content_types() - ### Example @@ -4733,16 +4575,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -4756,8 +4598,6 @@ No authorization required # **post_simple_enum_validation_response_body_for_content_types** -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - ### Example @@ -4792,16 +4632,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_simple_enum_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -4815,8 +4655,6 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() - ### Example @@ -4851,16 +4689,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -4874,8 +4712,6 @@ No authorization required # **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 @@ -4910,16 +4746,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -4933,8 +4769,6 @@ No authorization required # **post_uniqueitems_false_validation_response_body_for_content_types** -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - ### Example @@ -4969,16 +4803,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -4992,8 +4826,6 @@ No authorization required # **post_uniqueitems_validation_response_body_for_content_types** -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - ### Example @@ -5028,16 +4860,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -5051,8 +4883,6 @@ No authorization required # **post_uri_format_response_body_for_content_types** -> UriFormat post_uri_format_response_body_for_content_types() - ### Example @@ -5087,16 +4917,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -5110,8 +4940,6 @@ No authorization required # **post_uri_reference_format_response_body_for_content_types** -> UriReferenceFormat post_uri_reference_format_response_body_for_content_types() - ### Example @@ -5146,16 +4974,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_reference_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -5169,8 +4997,6 @@ No authorization required # **post_uri_template_format_response_body_for_content_types** -> UriTemplateFormat post_uri_template_format_response_body_for_content_types() - ### Example @@ -5205,16 +5031,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uri_template_format_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriTemplateFormat**](../../models/UriTemplateFormat.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 index befa17493b3..011eea04e96 100644 --- 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 @@ -22,8 +22,6 @@ Method | HTTP request | Description # **post_array_type_matches_arrays_request_body** -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - ### Example @@ -59,15 +57,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_array_type_matches_arrays_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_array_type_matches_arrays_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -78,9 +76,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_request_body.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -95,8 +93,6 @@ No authorization required # **post_array_type_matches_arrays_response_body_for_content_types** -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - ### Example @@ -131,16 +127,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -154,8 +150,6 @@ No authorization required # **post_boolean_type_matches_booleans_request_body** -> post_boolean_type_matches_booleans_request_body(body) - ### Example @@ -189,15 +183,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_boolean_type_matches_booleans_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_boolean_type_matches_booleans_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -208,9 +202,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_request_body.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -225,8 +219,6 @@ No authorization required # **post_boolean_type_matches_booleans_response_body_for_content_types** -> BooleanTypeMatchesBooleans post_boolean_type_matches_booleans_response_body_for_content_types() - ### Example @@ -261,16 +253,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -284,8 +276,6 @@ No authorization required # **post_integer_type_matches_integers_request_body** -> post_integer_type_matches_integers_request_body(body) - ### Example @@ -319,15 +309,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_integer_type_matches_integers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_integer_type_matches_integers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -338,9 +328,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_request_body.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -355,8 +345,6 @@ No authorization required # **post_integer_type_matches_integers_response_body_for_content_types** -> IntegerTypeMatchesIntegers post_integer_type_matches_integers_response_body_for_content_types() - ### Example @@ -391,16 +379,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -414,8 +402,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_request_body** -> post_null_type_matches_only_the_null_object_request_body(body) - ### Example @@ -449,15 +435,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_null_type_matches_only_the_null_object_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_null_type_matches_only_the_null_object_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -468,9 +454,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_request_body.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -485,8 +471,6 @@ No authorization required # **post_null_type_matches_only_the_null_object_response_body_for_content_types** -> NullTypeMatchesOnlyTheNullObject post_null_type_matches_only_the_null_object_response_body_for_content_types() - ### Example @@ -521,16 +505,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -544,8 +528,6 @@ No authorization required # **post_number_type_matches_numbers_request_body** -> post_number_type_matches_numbers_request_body(body) - ### Example @@ -579,15 +561,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_number_type_matches_numbers_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_number_type_matches_numbers_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -598,9 +580,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_request_body.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -615,8 +597,6 @@ No authorization required # **post_number_type_matches_numbers_response_body_for_content_types** -> NumberTypeMatchesNumbers post_number_type_matches_numbers_response_body_for_content_types() - ### Example @@ -651,16 +631,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -674,8 +654,6 @@ No authorization required # **post_object_type_matches_objects_request_body** -> post_object_type_matches_objects_request_body(body) - ### Example @@ -709,15 +687,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_object_type_matches_objects_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_object_type_matches_objects_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -728,9 +706,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_request_body.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -745,8 +723,6 @@ No authorization required # **post_object_type_matches_objects_response_body_for_content_types** -> ObjectTypeMatchesObjects post_object_type_matches_objects_response_body_for_content_types() - ### Example @@ -781,16 +757,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -804,8 +780,6 @@ No authorization required # **post_string_type_matches_strings_request_body** -> post_string_type_matches_strings_request_body(body) - ### Example @@ -839,15 +813,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_string_type_matches_strings_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_string_type_matches_strings_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -858,9 +832,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_request_body.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -875,8 +849,6 @@ No authorization required # **post_string_type_matches_strings_response_body_for_content_types** -> StringTypeMatchesStrings post_string_type_matches_strings_response_body_for_content_types() - ### Example @@ -911,16 +883,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.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 index a6efda37b07..6eb06bd8079 100644 --- 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 @@ -12,8 +12,6 @@ Method | HTTP request | Description # **post_uniqueitems_false_validation_request_body** -> post_uniqueitems_false_validation_request_body(body) - ### Example @@ -47,15 +45,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_false_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_false_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -66,9 +64,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -83,8 +81,6 @@ No authorization required # **post_uniqueitems_false_validation_response_body_for_content_types** -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - ### Example @@ -119,16 +115,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -142,8 +138,6 @@ No authorization required # **post_uniqueitems_validation_request_body** -> post_uniqueitems_validation_request_body(body) - ### Example @@ -177,15 +171,15 @@ with unit_test_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json] | required | +[body](#post_uniqueitems_validation_request_body.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_uniqueitems_validation_request_body.RequestBody.Schemas.application_json)] | required | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -196,9 +190,9 @@ Type | Description | Notes 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_request_body.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_request_body.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -213,8 +207,6 @@ No authorization required # **post_uniqueitems_validation_response_body_for_content_types** -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - ### Example @@ -249,16 +241,16 @@ This endpoint does not need any parameter. 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 +200 | [response_for_200.ApiResponse](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.ApiResponse) | success -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[application/json, ] | | +body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | headers | Unset | headers were not defined | -# application/json +# response_for_200.BodySchemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md index 577c0e64e56..7f698cf05b0 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/DefaultApi.md @@ -9,8 +9,6 @@ Method | HTTP request | Description # **post_operators** -> post_operators() - ### Example @@ -48,15 +46,15 @@ with this_package.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -body | typing.Union[application/json, Unset] | optional, default is unset | +[body](#post_operators.RequestBody) | typing.Union[[RequestBody.Schemas.application_json](#post_operators.RequestBody.Schemas.application_json), Unset] | optional, default is unset | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body +### body -# application/json +# RequestBody.Schemas.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Operator**](../../models/Operator.md) | | @@ -67,9 +65,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_operators.ApiResponseFor200) | OK +200 | [response_for_200.ApiResponse](#post_operators.response_for_200.ApiResponse) | OK -#### post_operators.ApiResponseFor200 +#### response_for_200.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 717311e32e3..359a5b952d4 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +2.0.0 \ No newline at end of file From 5f2d560cb752a18feb9a03937f18974b7ee7b8c0 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 12 Oct 2022 14:30:47 -0700 Subject: [PATCH 7/7] Fixes DefaultCodegenTests --- .../codegen/DefaultCodegenTest.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index cfdc60aa0aa..33eacd135ca 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -66,7 +66,7 @@ public void testDeeplyNestedAdditionalPropertiesImports() { codegen.setOpenAPI(openApi); PathItem path = openApi.getPaths().get("/ping"); CodegenOperation operation = codegen.fromOperation("/ping", "post", path.getPost(), path.getServers()); - Assert.assertEquals(Sets.intersection(operation.imports, Sets.newHashSet("Person")).size(), 1); + Assert.assertEquals(Sets.intersection(operation.responses.get(0).imports, Sets.newHashSet("Person")).size(), 1); } @Test @@ -4031,11 +4031,10 @@ public void testRequestParameterContent() { CodegenMediaType mt = content.get("application/json"); assertNull(mt.getEncoding()); CodegenProperty cp = mt.getSchema(); - // TODO need to revise the test below assertTrue(cp.isMap); assertTrue(cp.isModel); assertEquals(cp.complexType, "object"); - assertEquals(cp.baseName, "SchemaForRequestParameterCoordinatesInlineSchemaApplicationJson"); + assertEquals(cp.baseName, "coordinatesInlineSchema"); CodegenParameter coordinatesReferencedSchema = co.queryParams.get(1); content = coordinatesReferencedSchema.getContent(); @@ -4044,7 +4043,7 @@ public void testRequestParameterContent() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "SchemaForRequestParameterCoordinatesReferencedSchemaApplicationJson"); + assertEquals(cp.baseName, "coordinatesReferencedSchema"); } @Test @@ -4064,13 +4063,13 @@ public void testRequestBodyContent() { CodegenMediaType mt = content.get("application/json"); assertNull(mt.getEncoding()); CodegenProperty cp = mt.getSchema(); - assertEquals(cp.baseName, "SchemaForRequestBodyApplicationJson"); + assertEquals(cp.baseName, "application/json"); assertNotNull(cp); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "SchemaForRequestBodyTextPlain"); + assertEquals(cp.baseName, "text/plain"); assertNotNull(cp); // Note: the inline model resolver has a bug for this use case; it extracts an inline request body into a component // but the schema it references is not string type @@ -4084,13 +4083,13 @@ public void testRequestBodyContent() { mt = content.get("application/json"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "SchemaForRequestBodyApplicationJson"); + assertEquals(cp.baseName, "application/json"); assertEquals(cp.complexType, "coordinates"); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "SchemaForRequestBodyTextPlain"); + assertEquals(cp.baseName, "text/plain"); assertTrue(cp.isString); path = "/requestBodyWithEncodingTypes"; @@ -4171,12 +4170,12 @@ public void testResponseContentAndHeader() { CodegenProperty cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "SchemaFor200ResponseBodyApplicationJson"); + assertEquals(cp.baseName, "application/json"); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "SchemaFor200ResponseBodyTextPlain"); + assertEquals(cp.baseName, "text/plain"); assertTrue(cp.isString); cr = co.responses.get(1); @@ -4187,12 +4186,12 @@ public void testResponseContentAndHeader() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "SchemaFor201ResponseBodyApplicationJson"); + assertEquals(cp.baseName, "application/json"); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "SchemaFor201ResponseBodyTextPlain"); + assertEquals(cp.baseName, "text/plain"); assertTrue(cp.isString); }