From 2bd20f81fdadc17cc4dd408a165601d95115f9ce Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 14:32:25 -0700 Subject: [PATCH 01/23] Adds parameter template and code to write it --- .../languages/PythonClientCodegen.java | 11 ++++++ .../python/endpoint_parameter.handlebars | 36 +++++++++---------- .../endpoint_parameter_instance.handlebars | 24 +++++++++++++ ...dpoint_parameter_schema_and_def.handlebars | 2 +- 4 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.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 4bf21511eae..248b9431bd5 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 @@ -588,6 +588,17 @@ protected void generateEndpoints(OperationsMap objs) { outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, "request_body.py")); pathsFiles.add(Arrays.asList(paramMap, "endpoint_request_body.handlebars", outputFilename)); } + Integer i = 0; + for (CodegenParameter cp: co.allParams) { + Map paramMap = new HashMap<>(); + paramMap.put("parameter", cp); + // TODO consolidate imports into body param only + paramMap.put("imports", co.imports); + paramMap.put("packageName", packageName); + outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, "parameter_"+i.toString()+".py")); + pathsFiles.add(Arrays.asList(paramMap, "endpoint_parameter.handlebars", outputFilename)); + i++; + } for (CodegenResponse response: co.responses) { // paths.some_path.post.response_for_200.py (file per response) 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 b17fabfc0f8..1432250ade5 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,24 +1,20 @@ -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}} +{{#with parameter}} {{#if schema}} {{#with schema}} - schema=Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, +{{> model_templates/schema }} {{/with}} +{{else}} + {{#if getContent}} + {{#each getContent}} + {{#with this}} + {{#with schema}} +{{> model_templates/schema }} + {{/with}} + {{/with}} + {{/each}} + {{/if}} {{/if}} -{{#if getContent}} - content={ -{{#each getContent}} - "{{@key}}": {{#with this}}{{#with schema}}Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/with}}{{/with}}, -{{/each}} - }, -{{/if}} -{{#if required}} - required=True, -{{/if}} -{{#if isExplode}} - explode=True, -{{/if}} -), + + +{{> endpoint_parameter_instance }} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars new file mode 100644 index 00000000000..dfea53b1ba5 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars @@ -0,0 +1,24 @@ +parameter_oapg = 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={{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + {{/with}} +{{/if}} +{{#if getContent}} + content={ +{{#each getContent}} + "{{@key}}": {{#with this}}{{#with schema}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/with}}{{/with}}, +{{/each}} + }, +{{/if}} +{{#if required}} + required=True, +{{/if}} +{{#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 ab0b354e51f..2bb25bfb775 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 @@ -58,6 +58,6 @@ class {{xParamsName}}: parameters = [ {{#each xParams}} - {{> endpoint_parameter }} + {{> endpoint_parameter_instance }} {{/each}} ] \ No newline at end of file From 49ae219757d116ee70e28416513e51a664b2f0c1 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 14:54:30 -0700 Subject: [PATCH 02/23] Writes module for each parameter --- .../openapitools/codegen/DefaultCodegen.java | 13 +- .../main/resources/python/endpoint.handlebars | 3 + .../python/endpoint_parameter.handlebars | 13 + ...dpoint_parameter_schema_and_def.handlebars | 30 +- .../python/.openapi-generator/VERSION | 2 +- .../another_fake_dummy/patch/__init__.py | 1 + .../another_fake_dummy/patch/__init__.pyi | 1 + .../another_fake_dummy/patch/parameter_0.py | 39 +++ .../paths/fake/delete/__init__.py | 73 ++--- .../paths/fake/delete/__init__.pyi | 73 ++--- .../paths/fake/delete/parameter_0.py | 37 +++ .../paths/fake/delete/parameter_1.py | 36 +++ .../paths/fake/delete/parameter_2.py | 37 +++ .../paths/fake/delete/parameter_3.py | 36 +++ .../paths/fake/delete/parameter_4.py | 35 ++ .../paths/fake/delete/parameter_5.py | 36 +++ .../petstore_api/paths/fake/get/__init__.py | 247 ++------------ .../petstore_api/paths/fake/get/__init__.pyi | 201 ++---------- .../paths/fake/get/parameter_0.py | 77 +++++ .../paths/fake/get/parameter_1.py | 60 ++++ .../paths/fake/get/parameter_2.py | 78 +++++ .../paths/fake/get/parameter_3.py | 61 ++++ .../paths/fake/get/parameter_4.py | 57 ++++ .../paths/fake/get/parameter_5.py | 57 ++++ .../paths/fake/get/parameter_6.py | 162 ++++++++++ .../petstore_api/paths/fake/patch/__init__.py | 1 + .../paths/fake/patch/__init__.pyi | 1 + .../paths/fake/patch/parameter_0.py | 39 +++ .../petstore_api/paths/fake/post/__init__.py | 1 + .../petstore_api/paths/fake/post/__init__.pyi | 1 + .../paths/fake/post/parameter_0.py | 304 ++++++++++++++++++ .../get/__init__.py | 1 + .../get/__init__.pyi | 1 + .../get/parameter_0.py | 38 +++ .../put/__init__.py | 1 + .../put/__init__.pyi | 1 + .../put/parameter_0.py | 39 +++ .../put/__init__.py | 16 +- .../put/__init__.pyi | 16 +- .../put/parameter_0.py | 39 +++ .../put/parameter_1.py | 39 +++ .../put/__init__.py | 39 +-- .../put/__init__.pyi | 39 +-- .../put/parameter_0.py | 37 +++ .../put/parameter_1.py | 37 +++ .../put/parameter_2.py | 37 +++ .../fake_classname_test/patch/__init__.py | 1 + .../fake_classname_test/patch/__init__.pyi | 1 + .../fake_classname_test/patch/parameter_0.py | 39 +++ .../fake_delete_coffee_id/delete/__init__.py | 14 +- .../fake_delete_coffee_id/delete/__init__.pyi | 14 +- .../delete/parameter_0.py | 36 +++ .../post/__init__.py | 1 + .../post/__init__.pyi | 1 + .../post/parameter_0.py | 65 ++++ .../fake_inline_composition_/post/__init__.py | 163 +--------- .../post/__init__.pyi | 157 +-------- .../post/parameter_0.py | 80 +++++ .../post/parameter_1.py | 129 ++++++++ .../post/parameter_2.py | 175 ++++++++++ .../paths/fake_json_form_data/get/__init__.py | 1 + .../fake_json_form_data/get/__init__.pyi | 1 + .../fake_json_form_data/get/parameter_0.py | 102 ++++++ .../paths/fake_json_patch/patch/__init__.py | 1 + .../paths/fake_json_patch/patch/__init__.pyi | 1 + .../fake_json_patch/patch/parameter_0.py | 38 +++ .../fake_json_with_charset/post/__init__.py | 1 + .../fake_json_with_charset/post/__init__.pyi | 1 + .../post/parameter_0.py | 36 +++ .../paths/fake_obj_in_query/get/__init__.py | 63 +--- .../paths/fake_obj_in_query/get/__init__.pyi | 63 +--- .../fake_obj_in_query/get/parameter_0.py | 85 +++++ .../post/__init__.py | 218 ++++--------- .../post/__init__.pyi | 218 ++++--------- .../post/parameter_0.py | 36 +++ .../post/parameter_1.py | 36 +++ .../post/parameter_10.py | 35 ++ .../post/parameter_11.py | 35 ++ .../post/parameter_12.py | 35 ++ .../post/parameter_13.py | 35 ++ .../post/parameter_14.py | 36 +++ .../post/parameter_15.py | 36 +++ .../post/parameter_16.py | 36 +++ .../post/parameter_17.py | 36 +++ .../post/parameter_18.py | 36 +++ .../post/parameter_19.py | 36 +++ .../post/parameter_2.py | 36 +++ .../post/parameter_3.py | 36 +++ .../post/parameter_4.py | 36 +++ .../post/parameter_5.py | 36 +++ .../post/parameter_6.py | 36 +++ .../post/parameter_7.py | 36 +++ .../post/parameter_8.py | 36 +++ .../post/parameter_9.py | 36 +++ .../post/__init__.py | 15 +- .../post/__init__.pyi | 15 +- .../post/parameter_0.py | 36 +++ .../post/parameter_1.py | 100 ++++++ .../get/__init__.py | 15 +- .../get/__init__.pyi | 15 +- .../get/parameter_0.py | 37 +++ .../fake_ref_obj_in_query/get/__init__.py | 14 +- .../fake_ref_obj_in_query/get/__init__.pyi | 14 +- .../fake_ref_obj_in_query/get/parameter_0.py | 38 +++ .../fake_refs_array_of_enums/post/__init__.py | 1 + .../post/__init__.pyi | 1 + .../post/parameter_0.py | 38 +++ .../fake_refs_arraymodel/post/__init__.py | 1 + .../fake_refs_arraymodel/post/__init__.pyi | 1 + .../fake_refs_arraymodel/post/parameter_0.py | 38 +++ .../paths/fake_refs_boolean/post/__init__.py | 1 + .../paths/fake_refs_boolean/post/__init__.pyi | 1 + .../fake_refs_boolean/post/parameter_0.py | 38 +++ .../post/__init__.py | 1 + .../post/__init__.pyi | 1 + .../post/parameter_0.py | 38 +++ .../paths/fake_refs_enum/post/__init__.py | 1 + .../paths/fake_refs_enum/post/__init__.pyi | 1 + .../paths/fake_refs_enum/post/parameter_0.py | 38 +++ .../paths/fake_refs_mammal/post/__init__.py | 1 + .../paths/fake_refs_mammal/post/__init__.pyi | 1 + .../fake_refs_mammal/post/parameter_0.py | 39 +++ .../paths/fake_refs_number/post/__init__.py | 1 + .../paths/fake_refs_number/post/__init__.pyi | 1 + .../fake_refs_number/post/parameter_0.py | 38 +++ .../post/__init__.py | 1 + .../post/__init__.pyi | 1 + .../post/parameter_0.py | 38 +++ .../paths/fake_refs_string/post/__init__.py | 1 + .../paths/fake_refs_string/post/__init__.pyi | 1 + .../fake_refs_string/post/parameter_0.py | 38 +++ .../fake_test_query_paramters/put/__init__.py | 182 ++--------- .../put/__init__.pyi | 182 ++--------- .../put/parameter_0.py | 61 ++++ .../put/parameter_1.py | 60 ++++ .../put/parameter_2.py | 60 ++++ .../put/parameter_3.py | 60 ++++ .../put/parameter_4.py | 61 ++++ .../put/parameter_5.py | 39 +++ .../post/__init__.py | 1 + .../post/__init__.pyi | 1 + .../post/parameter_0.py | 37 +++ .../paths/fake_upload_file/post/__init__.py | 1 + .../paths/fake_upload_file/post/__init__.pyi | 1 + .../fake_upload_file/post/parameter_0.py | 100 ++++++ .../paths/fake_upload_files/post/__init__.py | 1 + .../paths/fake_upload_files/post/__init__.pyi | 1 + .../fake_upload_files/post/parameter_0.py | 107 ++++++ .../petstore_api/paths/pet/post/__init__.py | 1 + .../petstore_api/paths/pet/post/__init__.pyi | 1 + .../paths/pet/post/parameter_0.py | 41 +++ .../petstore_api/paths/pet/put/__init__.py | 1 + .../petstore_api/paths/pet/put/__init__.pyi | 1 + .../petstore_api/paths/pet/put/parameter_0.py | 41 +++ .../paths/pet_find_by_status/get/__init__.py | 61 +--- .../paths/pet_find_by_status/get/__init__.pyi | 53 +-- .../pet_find_by_status/get/parameter_0.py | 83 +++++ .../paths/pet_find_by_tags/get/__init__.py | 36 +-- .../paths/pet_find_by_tags/get/__init__.pyi | 36 +-- .../paths/pet_find_by_tags/get/parameter_0.py | 58 ++++ .../paths/pet_pet_id/delete/__init__.py | 27 +- .../paths/pet_pet_id/delete/__init__.pyi | 27 +- .../paths/pet_pet_id/delete/parameter_0.py | 36 +++ .../paths/pet_pet_id/delete/parameter_1.py | 35 ++ .../paths/pet_pet_id/get/__init__.py | 14 +- .../paths/pet_pet_id/get/__init__.pyi | 14 +- .../paths/pet_pet_id/get/parameter_0.py | 36 +++ .../paths/pet_pet_id/post/__init__.py | 15 +- .../paths/pet_pet_id/post/__init__.pyi | 15 +- .../paths/pet_pet_id/post/parameter_0.py | 36 +++ .../paths/pet_pet_id/post/parameter_1.py | 95 ++++++ .../pet_pet_id_upload_image/post/__init__.py | 15 +- .../pet_pet_id_upload_image/post/__init__.pyi | 15 +- .../post/parameter_0.py | 36 +++ .../post/parameter_1.py | 95 ++++++ .../paths/store_order/post/__init__.py | 1 + .../paths/store_order/post/__init__.pyi | 1 + .../paths/store_order/post/parameter_0.py | 39 +++ .../store_order_order_id/delete/__init__.py | 14 +- .../store_order_order_id/delete/__init__.pyi | 14 +- .../delete/parameter_0.py | 36 +++ .../store_order_order_id/get/__init__.py | 24 +- .../store_order_order_id/get/__init__.pyi | 19 +- .../store_order_order_id/get/parameter_0.py | 46 +++ .../petstore_api/paths/user/post/__init__.py | 1 + .../petstore_api/paths/user/post/__init__.pyi | 1 + .../paths/user/post/parameter_0.py | 39 +++ .../user_create_with_array/post/__init__.py | 1 + .../user_create_with_array/post/__init__.pyi | 1 + .../post/parameter_0.py | 64 ++++ .../user_create_with_list/post/__init__.py | 1 + .../user_create_with_list/post/__init__.pyi | 1 + .../user_create_with_list/post/parameter_0.py | 64 ++++ .../paths/user_login/get/__init__.py | 27 +- .../paths/user_login/get/__init__.pyi | 27 +- .../paths/user_login/get/parameter_0.py | 37 +++ .../paths/user_login/get/parameter_1.py | 37 +++ .../paths/user_login/get/response_for_200.py | 21 +- .../paths/user_username/delete/__init__.py | 14 +- .../paths/user_username/delete/__init__.pyi | 14 +- .../paths/user_username/delete/parameter_0.py | 36 +++ .../paths/user_username/get/__init__.py | 14 +- .../paths/user_username/get/__init__.pyi | 14 +- .../paths/user_username/get/parameter_0.py | 36 +++ .../paths/user_username/put/__init__.py | 15 +- .../paths/user_username/put/__init__.pyi | 15 +- .../paths/user_username/put/parameter_0.py | 38 +++ .../paths/user_username/put/parameter_1.py | 39 +++ 208 files changed, 5634 insertions(+), 2269 deletions(-) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_19.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py 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 3be79f57e4c..b92825713d2 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 @@ -4386,20 +4386,15 @@ public CodegenOperation fromOperation(String path, } if (parameters != null) { + Integer i = 0; for (Parameter param : parameters) { param = ModelUtils.getReferencedParameter(this.openAPI, param); CodegenParameter p = fromParameter(param, imports); - p.setContent(getContent(param.getContent(), imports, param.getName())); - - // ensure unique params - if (ensureUniqueParams) { - while (!isParameterNameUnique(p, allParams)) { - p.paramName = generateNextName(p.paramName); - } - } - + p.setContent(getContent(param.getContent(), imports, "schema")); + p.paramName = "parameter_" + i.toString(); allParams.add(p); + i++; if (param instanceof QueryParameter || "query".equalsIgnoreCase(param.getIn())) { queryParams.add(p.copy()); 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 6c5c7d7e4e6..3e46dcdc621 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 @@ -25,6 +25,9 @@ from . import response_for_{{#if isDefault}}default{{else}}{{code}}{{/if}} {{#if bodyParam}} from . import request_body {{/if}} +{{#each allParams}} +from . import {{paramName}} +{{/each}} {{#or queryParams headerParams pathParams cookieParams}} {{#if queryParams}} 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 1432250ade5..5c098ee10bf 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,3 +1,16 @@ +# coding: utf-8 + +{{>partial_header}} + +from dataclasses import dataclass +import typing_extensions +import urllib3 + +from {{packageName}} import api_client, exceptions +{{> model_templates/imports_schema_types }} +{{> model_templates/imports_schemas }} + + {{#with parameter}} {{#if schema}} {{#with schema}} 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 2bb25bfb775..241339dd280 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,35 +1,15 @@ class {{xParamsName}}: - class Schemas: -{{#each xParams}} - {{#if schema}} - {{#with schema}} - {{> model_templates/schema }} - {{/with}} - {{else}} - {{#if getContent}} - {{#each getContent}} - {{#with this}} - {{#with schema}} - {{> model_templates/schema }} - {{/with}} - {{/with}} - {{/each}} - {{/if}} - {{/if}} -{{/each}} - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { {{#each xParams}} {{#if required}} {{#if schema}} - '{{baseName}}': {{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}} + '{{baseName}}': {{#with schema}}typing.Union[{{paramName}}.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}} {{else}} - '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} + '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[{{paramName}}.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} {{/if}} {{/if}} {{/each}} @@ -41,9 +21,9 @@ class {{xParamsName}}: {{#each xParams}} {{#unless required}} {{#if schema}} - '{{baseName}}': {{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}} + '{{baseName}}': {{#with schema}}typing.Union[{{paramName}}.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}} {{else}} - '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[Schemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} + '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[{{paramName}}.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} {{/if}} {{/unless}} {{/each}} @@ -58,6 +38,6 @@ class {{xParamsName}}: parameters = [ {{#each xParams}} - {{> endpoint_parameter_instance }} + {{paramName}}.parameter_oapg, {{/each}} ] \ No newline at end of file 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/petstore_api/paths/another_fake_dummy/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py index e900456505b..5c3b5c65d61 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import client _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi index 1a5cd51dba2..50417997373 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.client import Client from . import response_for_200 from . import request_body +from . import client _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py new file mode 100644 index 00000000000..b8a9c1ef20b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py @@ -0,0 +1,39 @@ +# 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.client import Client + + +application_json = Client + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), 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 da048e81b67..f5c80c14afe 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 @@ -27,29 +27,28 @@ from .. import path from . import response_for_200 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 class RequestQueryParameters: - class Schemas: - 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.required_string_group, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[Schemas.required_int64_group, decimal.Decimal, int, ], + 'required_string_group': typing.Union[parameter_0.required_string_group, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[parameter_2.required_int64_group, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'string_group': typing.Union[Schemas.string_group, decimal.Decimal, int, ], - 'int64_group': typing.Union[Schemas.int64_group, decimal.Decimal, int, ], + 'string_group': typing.Union[parameter_3.string_group, decimal.Decimal, int, ], + 'int64_group': typing.Union[parameter_5.int64_group, decimal.Decimal, int, ], }, total=False ) @@ -60,50 +59,23 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="required_string_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.required_string_group, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="required_int64_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.required_int64_group, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="string_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.string_group, - explode=True, - ), - api_client.QueryParameter( - name="int64_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.int64_group, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_5.parameter_oapg, ] class RequestHeaderParameters: - class Schemas: - required_boolean_group = schemas.BoolSchema - boolean_group = schemas.BoolSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_boolean_group': typing.Union[Schemas.required_boolean_group, bool, ], + 'required_boolean_group': typing.Union[parameter_1.required_boolean_group, bool, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'boolean_group': typing.Union[Schemas.boolean_group, bool, ], + 'boolean_group': typing.Union[parameter_4.boolean_group, bool, ], }, total=False ) @@ -114,17 +86,8 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.HeaderParameter( - name="required_boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.required_boolean_group, - required=True, - ), - api_client.HeaderParameter( - name="boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.boolean_group, - ), + parameter_1.parameter_oapg, + parameter_4.parameter_oapg, ] _auth = [ 'bearer_test', 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 14768ee0b6a..24fa5daab55 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 @@ -26,29 +26,28 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 class RequestQueryParameters: - class Schemas: - 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.required_string_group, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[Schemas.required_int64_group, decimal.Decimal, int, ], + 'required_string_group': typing.Union[parameter_0.required_string_group, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[parameter_2.required_int64_group, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'string_group': typing.Union[Schemas.string_group, decimal.Decimal, int, ], - 'int64_group': typing.Union[Schemas.int64_group, decimal.Decimal, int, ], + 'string_group': typing.Union[parameter_3.string_group, decimal.Decimal, int, ], + 'int64_group': typing.Union[parameter_5.int64_group, decimal.Decimal, int, ], }, total=False ) @@ -59,50 +58,23 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="required_string_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.required_string_group, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="required_int64_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.required_int64_group, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="string_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.string_group, - explode=True, - ), - api_client.QueryParameter( - name="int64_group", - style=api_client.ParameterStyle.FORM, - schema=Schemas.int64_group, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_5.parameter_oapg, ] class RequestHeaderParameters: - class Schemas: - required_boolean_group = schemas.BoolSchema - boolean_group = schemas.BoolSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_boolean_group': typing.Union[Schemas.required_boolean_group, bool, ], + 'required_boolean_group': typing.Union[parameter_1.required_boolean_group, bool, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'boolean_group': typing.Union[Schemas.boolean_group, bool, ], + 'boolean_group': typing.Union[parameter_4.boolean_group, bool, ], }, total=False ) @@ -113,17 +85,8 @@ class RequestHeaderParameters: parameters = [ - api_client.HeaderParameter( - name="required_boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.required_boolean_group, - required=True, - ), - api_client.HeaderParameter( - name="boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.boolean_group, - ), + parameter_1.parameter_oapg, + parameter_4.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py new file mode 100644 index 00000000000..66da152b6e8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py @@ -0,0 +1,37 @@ +# 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 + + +required_string_group = schemas.IntSchema + + +parameter_oapg = api_client.QueryParameter( + name="required_string_group", + style=api_client.ParameterStyle.FORM, + schema=required_string_group, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py new file mode 100644 index 00000000000..247bfbe313a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py @@ -0,0 +1,36 @@ +# 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 + + +required_boolean_group = schemas.BoolSchema + + +parameter_oapg = api_client.HeaderParameter( + name="required_boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=required_boolean_group, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py new file mode 100644 index 00000000000..4f6e9f3d9f6 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py @@ -0,0 +1,37 @@ +# 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 + + +required_int64_group = schemas.Int64Schema + + +parameter_oapg = api_client.QueryParameter( + name="required_int64_group", + style=api_client.ParameterStyle.FORM, + schema=required_int64_group, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py new file mode 100644 index 00000000000..e99c1a50c25 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py @@ -0,0 +1,36 @@ +# 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 + + +string_group = schemas.IntSchema + + +parameter_oapg = api_client.QueryParameter( + name="string_group", + style=api_client.ParameterStyle.FORM, + schema=string_group, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py new file mode 100644 index 00000000000..d19cd18a53b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py @@ -0,0 +1,35 @@ +# 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 + + +boolean_group = schemas.BoolSchema + + +parameter_oapg = api_client.HeaderParameter( + name="boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=boolean_group, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py new file mode 100644 index 00000000000..147a25113cb --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py @@ -0,0 +1,36 @@ +# 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 + + +int64_group = schemas.Int64Schema + + +parameter_oapg = api_client.QueryParameter( + name="int64_group", + style=api_client.ParameterStyle.FORM, + schema=int64_group, + explode=True, +), 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 089c8ac98dc..5b35d4baee7 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 @@ -29,126 +29,17 @@ from . import response_for_200 from . import response_for_404 from . import request_body +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 +from . import body class RequestQueryParameters: - class Schemas: - - - class enum_query_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_query_string_array': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class enum_query_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)") - - - class enum_query_integer( - 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 enum_query_double( - 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', { @@ -157,10 +48,10 @@ def NEGATIVE_1_PT_2(cls): OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + 'enum_query_string_array': typing.Union[parameter_2.enum_query_string_array, list, tuple, ], + 'enum_query_string': typing.Union[parameter_3.enum_query_string, str, ], + 'enum_query_integer': typing.Union[parameter_4.enum_query_integer, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[parameter_5.enum_query_double, decimal.Decimal, int, float, ], }, total=False ) @@ -171,105 +62,13 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="enum_query_string_array", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_string_array, - explode=True, - ), - api_client.QueryParameter( - name="enum_query_string", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_string, - explode=True, - ), - api_client.QueryParameter( - name="enum_query_integer", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_integer, - explode=True, - ), - api_client.QueryParameter( - name="enum_query_double", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_double, - explode=True, - ), + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_4.parameter_oapg, + parameter_5.parameter_oapg, ] class RequestHeaderParameters: - class Schemas: - - - class enum_header_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_header_string_array': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class enum_header_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)") - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -278,8 +77,8 @@ def XYZ(cls): OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_header_string_array': typing.Union[Schemas.enum_header_string_array, list, tuple, ], - 'enum_header_string': typing.Union[Schemas.enum_header_string, str, ], + 'enum_header_string_array': typing.Union[parameter_0.enum_header_string_array, list, tuple, ], + 'enum_header_string': typing.Union[parameter_1.enum_header_string, str, ], }, total=False ) @@ -290,16 +89,8 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.HeaderParameter( - name="enum_header_string_array", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.enum_header_string_array, - ), - api_client.HeaderParameter( - name="enum_header_string", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.enum_header_string, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 1a758ace312..a24371dfefa 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 @@ -28,95 +28,17 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 from . import request_body +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 +from . import body class RequestQueryParameters: - class Schemas: - - - class enum_query_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_query_string_array': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class enum_query_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)") - - - class enum_query_integer( - schemas.EnumBase, - schemas.Int32Schema - ): - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def NEGATIVE_2(cls): - return cls(-2) - - - class enum_query_double( - 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', { @@ -125,10 +47,10 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + 'enum_query_string_array': typing.Union[parameter_2.enum_query_string_array, list, tuple, ], + 'enum_query_string': typing.Union[parameter_3.enum_query_string, str, ], + 'enum_query_integer': typing.Union[parameter_4.enum_query_integer, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[parameter_5.enum_query_double, decimal.Decimal, int, float, ], }, total=False ) @@ -139,90 +61,13 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="enum_query_string_array", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_string_array, - explode=True, - ), - api_client.QueryParameter( - name="enum_query_string", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_string, - explode=True, - ), - api_client.QueryParameter( - name="enum_query_integer", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_integer, - explode=True, - ), - api_client.QueryParameter( - name="enum_query_double", - style=api_client.ParameterStyle.FORM, - schema=Schemas.enum_query_double, - explode=True, - ), + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_4.parameter_oapg, + parameter_5.parameter_oapg, ] class RequestHeaderParameters: - class Schemas: - - - class enum_header_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_header_string_array': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class enum_header_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)") - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -231,8 +76,8 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_header_string_array': typing.Union[Schemas.enum_header_string_array, list, tuple, ], - 'enum_header_string': typing.Union[Schemas.enum_header_string, str, ], + 'enum_header_string_array': typing.Union[parameter_0.enum_header_string_array, list, tuple, ], + 'enum_header_string': typing.Union[parameter_1.enum_header_string, str, ], }, total=False ) @@ -243,16 +88,8 @@ class RequestHeaderParameters: parameters = [ - api_client.HeaderParameter( - name="enum_header_string_array", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.enum_header_string_array, - ), - api_client.HeaderParameter( - name="enum_header_string", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.enum_header_string, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py new file mode 100644 index 00000000000..0ca823d6f53 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py @@ -0,0 +1,77 @@ +# 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 + + + + +class enum_header_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_header_string_array': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.HeaderParameter( + name="enum_header_string_array", + style=api_client.ParameterStyle.SIMPLE, + schema=enum_header_string_array, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py new file mode 100644 index 00000000000..58b280b103e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py @@ -0,0 +1,60 @@ +# 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 + + + + +class enum_header_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)") + + +parameter_oapg = api_client.HeaderParameter( + name="enum_header_string", + style=api_client.ParameterStyle.SIMPLE, + schema=enum_header_string, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py new file mode 100644 index 00000000000..ff1965beca0 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py @@ -0,0 +1,78 @@ +# 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 + + + + +class enum_query_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_query_string_array': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="enum_query_string_array", + style=api_client.ParameterStyle.FORM, + schema=enum_query_string_array, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py new file mode 100644 index 00000000000..4eb3d9c7190 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py @@ -0,0 +1,61 @@ +# 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 + + + + +class enum_query_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)") + + +parameter_oapg = api_client.QueryParameter( + name="enum_query_string", + style=api_client.ParameterStyle.FORM, + schema=enum_query_string, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py new file mode 100644 index 00000000000..e4d2f75b948 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py @@ -0,0 +1,57 @@ +# 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 + + + + +class enum_query_integer( + 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) + + +parameter_oapg = api_client.QueryParameter( + name="enum_query_integer", + style=api_client.ParameterStyle.FORM, + schema=enum_query_integer, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py new file mode 100644 index 00000000000..f3a753f2f05 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py @@ -0,0 +1,57 @@ +# 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 + + + + +class enum_query_double( + 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) + + +parameter_oapg = api_client.QueryParameter( + name="enum_query_double", + style=api_client.ParameterStyle.FORM, + schema=enum_query_double, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py new file mode 100644 index 00000000000..f60dd18d9cd --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py @@ -0,0 +1,162 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/x-www-form-urlencoded": application_x_www_form_urlencoded, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py index ccbf1ed435f..f674b44c3b6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import client _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi index 7d0b9305f40..b0e54f82d94 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.client import Client from . import response_for_200 from . import request_body +from . import client _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py new file mode 100644 index 00000000000..b8a9c1ef20b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py @@ -0,0 +1,39 @@ +# 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.client import Client + + +application_json = Client + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), 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 index 1667278108e..fc02f498242 100644 --- 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 @@ -29,6 +29,7 @@ from . import response_for_200 from . import response_for_404 from . import request_body +from . import body _auth = [ 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 index 5dacc717956..f5430cb833e 100644 --- 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 @@ -28,6 +28,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 from . import request_body +from . import body diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py new file mode 100644 index 00000000000..2b7dce9b59c --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py @@ -0,0 +1,304 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/x-www-form-urlencoded": application_x_www_form_urlencoded, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py index ae4cbd77aa9..1055b00366e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import additional_properties_with_array_of_enums _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi index e42e3053bb9..aed7821b430 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.additional_properties_with_array_of_enums import Additio from . import response_for_200 from . import request_body +from . import additional_properties_with_array_of_enums _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py new file mode 100644 index 00000000000..3059b4ffa6c --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py @@ -0,0 +1,38 @@ +# 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.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums + + +application_json = AdditionalPropertiesWithArrayOfEnums + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py index 5f471517ac7..ed5c3f337f8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import file_schema_test_class _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi index 4efc088b123..06742bafc44 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.file_schema_test_class import FileSchemaTestClass from . import response_for_200 from . import request_body +from . import file_schema_test_class diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py new file mode 100644 index 00000000000..84a22922402 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py @@ -0,0 +1,39 @@ +# 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.file_schema_test_class import FileSchemaTestClass + + +application_json = FileSchemaTestClass + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), 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 4daea953f29..d3abb9e411b 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 @@ -30,18 +30,16 @@ from .. import path from . import response_for_200 from . import request_body +from . import parameter_0 +from . import user class RequestQueryParameters: - class Schemas: - query = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[Schemas.query, str, ], + 'query': typing.Union[parameter_0.query, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,13 +55,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=Schemas.query, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 36ece9e394e..92049279fce 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 @@ -29,18 +29,16 @@ from petstore_api.model.user import User from . import response_for_200 from . import request_body +from . import parameter_0 +from . import user class RequestQueryParameters: - class Schemas: - query = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[Schemas.query, str, ], + 'query': typing.Union[parameter_0.query, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,13 +54,7 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=Schemas.query, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py new file mode 100644 index 00000000000..d6b0786b9d4 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py @@ -0,0 +1,39 @@ +# 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.user import User + + +query = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="query", + style=api_client.ParameterStyle.FORM, + schema=query, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py new file mode 100644 index 00000000000..8b6b93f5436 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py @@ -0,0 +1,39 @@ +# 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.user import User + + +application_json = User + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=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 66ab8139986..88c3edf659f 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 @@ -26,22 +26,19 @@ from .. import path from . import response_for_200 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 class RequestQueryParameters: - class Schemas: - someVar = schemas.StrSchema - SomeVar = schemas.StrSchema - some_var = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[Schemas.someVar, str, ], - 'SomeVar': typing.Union[Schemas.SomeVar, str, ], - 'some_var': typing.Union[Schemas.some_var, str, ], + 'someVar': typing.Union[parameter_0.someVar, str, ], + 'SomeVar': typing.Union[parameter_1.SomeVar, str, ], + 'some_var': typing.Union[parameter_2.some_var, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,27 +54,9 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="someVar", - style=api_client.ParameterStyle.FORM, - schema=Schemas.someVar, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="SomeVar", - style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVar, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="some_var", - style=api_client.ParameterStyle.FORM, - schema=Schemas.some_var, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, + parameter_2.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 6d7cc22808c..6bac30676fb 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 @@ -25,22 +25,19 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 class RequestQueryParameters: - class Schemas: - someVar = schemas.StrSchema - SomeVar = schemas.StrSchema - some_var = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[Schemas.someVar, str, ], - 'SomeVar': typing.Union[Schemas.SomeVar, str, ], - 'some_var': typing.Union[Schemas.some_var, str, ], + 'someVar': typing.Union[parameter_0.someVar, str, ], + 'SomeVar': typing.Union[parameter_1.SomeVar, str, ], + 'some_var': typing.Union[parameter_2.some_var, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,27 +53,9 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="someVar", - style=api_client.ParameterStyle.FORM, - schema=Schemas.someVar, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="SomeVar", - style=api_client.ParameterStyle.FORM, - schema=Schemas.SomeVar, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="some_var", - style=api_client.ParameterStyle.FORM, - schema=Schemas.some_var, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, + parameter_2.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py new file mode 100644 index 00000000000..04bff5b10a0 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py @@ -0,0 +1,37 @@ +# 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 + + +someVar = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="someVar", + style=api_client.ParameterStyle.FORM, + schema=someVar, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py new file mode 100644 index 00000000000..5d55e1f6f35 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py @@ -0,0 +1,37 @@ +# 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 + + +SomeVar = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="SomeVar", + style=api_client.ParameterStyle.FORM, + schema=SomeVar, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py new file mode 100644 index 00000000000..7d777cce370 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py @@ -0,0 +1,37 @@ +# 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 + + +some_var = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="some_var", + style=api_client.ParameterStyle.FORM, + schema=some_var, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py index a3bb4cd7f4b..6936f02b688 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import client _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi index a38e2de8811..1b5086f0bf9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.client import Client from . import response_for_200 from . import request_body +from . import client _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py new file mode 100644 index 00000000000..b8a9c1ef20b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py @@ -0,0 +1,39 @@ +# 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.client import Client + + +application_json = Client + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=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 2e0c3e6818e..d720b86ba11 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 @@ -27,18 +27,15 @@ from .. import path from . import response_for_200 from . import response_for_default +from . import parameter_0 class RequestPathParameters: - class Schemas: - id = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[Schemas.id, str, ], + 'id': typing.Union[parameter_0.id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -54,12 +51,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="id", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.id, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 eb86b5b2807..99ff8be2ae4 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 @@ -26,18 +26,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_default +from . import parameter_0 class RequestPathParameters: - class Schemas: - id = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[Schemas.id, str, ], + 'id': typing.Union[parameter_0.id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -53,12 +50,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="id", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.id, - required=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py new file mode 100644 index 00000000000..8df81412afd --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +id = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=id, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py index d2bdb197a74..c74c1da49ef 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import request_body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi index 7e1f3d7ac1c..3002b70b491 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import request_body diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py new file mode 100644 index 00000000000..d5fd48475fd --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py @@ -0,0 +1,65 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + 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 507f5dc0c48..03715638739 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 @@ -28,152 +28,13 @@ from .. import path from . import response_for_200 from . import request_body +from . import parameter_0 +from . import parameter_1 +from . import any_type class RequestQueryParameters: - class Schemas: - - - class compositionAtRoot( - 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], - ) -> 'compositionAtRoot': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) - - - class compositionInProperty( - 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], - ) -> 'compositionInProperty': - return super().__new__( - cls, - *args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -182,8 +43,8 @@ def __new__( OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + 'compositionAtRoot': typing.Union[parameter_0.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[parameter_1.compositionInProperty, dict, frozendict.frozendict, ], }, total=False ) @@ -194,18 +55,8 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="compositionAtRoot", - style=api_client.ParameterStyle.FORM, - schema=Schemas.compositionAtRoot, - explode=True, - ), - api_client.QueryParameter( - name="compositionInProperty", - style=api_client.ParameterStyle.FORM, - schema=Schemas.compositionInProperty, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 a417cdc311e..6053e34a572 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 @@ -27,146 +27,13 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import parameter_0 +from . import parameter_1 +from . import any_type class RequestQueryParameters: - class Schemas: - - - class compositionAtRoot( - 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], - ) -> 'compositionAtRoot': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) - - - class compositionInProperty( - 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], - ) -> 'compositionInProperty': - return super().__new__( - cls, - *args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -175,8 +42,8 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + 'compositionAtRoot': typing.Union[parameter_0.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[parameter_1.compositionInProperty, dict, frozendict.frozendict, ], }, total=False ) @@ -187,18 +54,8 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="compositionAtRoot", - style=api_client.ParameterStyle.FORM, - schema=Schemas.compositionAtRoot, - explode=True, - ), - api_client.QueryParameter( - name="compositionInProperty", - style=api_client.ParameterStyle.FORM, - schema=Schemas.compositionInProperty, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, ]_all_accept_content_types = ( 'application/json', 'multipart/form-data', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py new file mode 100644 index 00000000000..40c161a1056 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py @@ -0,0 +1,80 @@ +# 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 + + + + +class compositionAtRoot( + 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], + ) -> 'compositionAtRoot': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +parameter_oapg = api_client.QueryParameter( + name="compositionAtRoot", + style=api_client.ParameterStyle.FORM, + schema=compositionAtRoot, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py new file mode 100644 index 00000000000..a0cbe8dfb6e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py @@ -0,0 +1,129 @@ +# 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 + + + + +class compositionInProperty( + 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], + ) -> 'compositionInProperty': + return super().__new__( + cls, + *args, + someProp=someProp, + _configuration=_configuration, + **kwargs, + ) + + +parameter_oapg = api_client.QueryParameter( + name="compositionInProperty", + style=api_client.ParameterStyle.FORM, + schema=compositionInProperty, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py new file mode 100644 index 00000000000..6b2e40f719e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py @@ -0,0 +1,175 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + "multipart/form-data": multipart_form_data, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py index e4aabfad0b0..270a02a787f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi index b127066bed7..c58a8cc9bc3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import body diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py new file mode 100644 index 00000000000..f03c1800073 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py @@ -0,0 +1,102 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/x-www-form-urlencoded": application_x_www_form_urlencoded, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py index c0dbecc4f4f..b789408ca17 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import json_patch_request _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi index 9c6f437c039..24c62be3b87 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.json_patch_request import JSONPatchRequest from . import response_for_200 from . import request_body +from . import json_patch_request diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py new file mode 100644 index 00000000000..b6ce89f605d --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py @@ -0,0 +1,38 @@ +# 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.json_patch_request import JSONPatchRequest + + +application_json_patchjson = JSONPatchRequest + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json-patch+json": application_json_patchjson, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py index 6451c71cc23..976b5898e5b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi index 493a6f779a4..752a6936c2e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json; charset=utf-8', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py new file mode 100644 index 00000000000..37f2eae2318 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +application_json_charsetutf_8 = schemas.AnyTypeSchema + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json; charset=utf-8": application_json_charsetutf_8, + }, +), 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 28dcbfceb2a..e15436cd40c 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 @@ -26,63 +26,11 @@ from .. import path from . import response_for_200 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - - - class mapBean( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - keyword = schemas.StrSchema - __annotations__ = { - "keyword": keyword, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'mapBean': - return super().__new__( - cls, - *args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -91,7 +39,7 @@ def __new__( OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.mapBean, dict, frozendict.frozendict, ], + 'mapBean': typing.Union[parameter_0.mapBean, dict, frozendict.frozendict, ], }, total=False ) @@ -102,12 +50,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.mapBean, - explode=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 060db024e93..189dc1fec05 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 @@ -25,63 +25,11 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - - - class mapBean( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - keyword = schemas.StrSchema - __annotations__ = { - "keyword": keyword, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'mapBean': - return super().__new__( - cls, - *args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -90,7 +38,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.mapBean, dict, frozendict.frozendict, ], + 'mapBean': typing.Union[parameter_0.mapBean, dict, frozendict.frozendict, ], }, total=False ) @@ -101,12 +49,7 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.mapBean, - explode=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py new file mode 100644 index 00000000000..85df3f5fb7e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py @@ -0,0 +1,85 @@ +# 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 + + + + +class mapBean( + schemas.DictSchema +): + + + class MetaOapg: + + class properties: + keyword = schemas.StrSchema + __annotations__ = { + "keyword": keyword, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict.frozendict, ], + keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'mapBean': + return super().__new__( + cls, + *args, + keyword=keyword, + _configuration=_configuration, + **kwargs, + ) + + +parameter_oapg = api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=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 5f7c7283d76..d0cf8a22401 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 @@ -28,18 +28,30 @@ from .. import path from . import response_for_200 from . import request_body +from . import parameter_9 +from . import parameter_10 +from . import parameter_11 +from . import parameter_12 +from . import parameter_13 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 +from . import parameter_6 +from . import parameter_7 +from . import parameter_8 +from . import parameter_14 +from . import parameter_15 +from . import parameter_16 +from . import parameter_17 +from . import parameter_18 +from . import body class RequestQueryParameters: - class Schemas: - _1 = schemas.StrSchema - aB = schemas.StrSchema - Ab = schemas.StrSchema - _self = schemas.StrSchema - a_b = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -48,11 +60,11 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + '1': typing.Union[parameter_0._1, str, ], + 'aB': typing.Union[parameter_1.aB, str, ], + 'Ab': typing.Union[parameter_2.Ab, str, ], + 'self': typing.Union[parameter_3._self, str, ], + 'A-B': typing.Union[parameter_4.a_b, str, ], }, total=False ) @@ -63,46 +75,14 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Schemas._1, - explode=True, - ), - api_client.QueryParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=Schemas.aB, - explode=True, - ), - api_client.QueryParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=Schemas.Ab, - explode=True, - ), - api_client.QueryParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=Schemas._self, - explode=True, - ), - api_client.QueryParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=Schemas.a_b, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_4.parameter_oapg, ] class RequestHeaderParameters: - class Schemas: - _1 = schemas.StrSchema - aB = schemas.StrSchema - _self = schemas.StrSchema - a_b = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -111,10 +91,10 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + '1': typing.Union[parameter_5._1, str, ], + 'aB': typing.Union[parameter_6.aB, str, ], + 'self': typing.Union[parameter_7._self, str, ], + 'A-B': typing.Union[parameter_8.a_b, str, ], }, total=False ) @@ -125,45 +105,21 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.HeaderParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._1, - ), - api_client.HeaderParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.aB, - ), - api_client.HeaderParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._self, - ), - api_client.HeaderParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.a_b, - ), + parameter_5.parameter_oapg, + parameter_6.parameter_oapg, + parameter_7.parameter_oapg, + parameter_8.parameter_oapg, ] class RequestPathParameters: - class Schemas: - _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._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, ], + '1': typing.Union[parameter_9._1, str, ], + 'aB': typing.Union[parameter_10.aB, str, ], + 'Ab': typing.Union[parameter_11.Ab, str, ], + 'self': typing.Union[parameter_12._self, str, ], + 'A-B': typing.Union[parameter_13.a_b, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -179,47 +135,14 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._1, - required=True, - ), - api_client.PathParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.aB, - required=True, - ), - api_client.PathParameter( - name="Ab", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.Ab, - required=True, - ), - api_client.PathParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._self, - required=True, - ), - api_client.PathParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.a_b, - required=True, - ), + parameter_9.parameter_oapg, + parameter_10.parameter_oapg, + parameter_11.parameter_oapg, + parameter_12.parameter_oapg, + parameter_13.parameter_oapg, ] class RequestCookieParameters: - class Schemas: - _1 = schemas.StrSchema - aB = schemas.StrSchema - Ab = schemas.StrSchema - _self = schemas.StrSchema - a_b = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -228,11 +151,11 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + '1': typing.Union[parameter_14._1, str, ], + 'aB': typing.Union[parameter_15.aB, str, ], + 'Ab': typing.Union[parameter_16.Ab, str, ], + 'self': typing.Union[parameter_17._self, str, ], + 'A-B': typing.Union[parameter_18.a_b, str, ], }, total=False ) @@ -243,36 +166,11 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.CookieParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Schemas._1, - explode=True, - ), - api_client.CookieParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=Schemas.aB, - explode=True, - ), - api_client.CookieParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=Schemas.Ab, - explode=True, - ), - api_client.CookieParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=Schemas._self, - explode=True, - ), - api_client.CookieParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=Schemas.a_b, - explode=True, - ), + parameter_14.parameter_oapg, + parameter_15.parameter_oapg, + parameter_16.parameter_oapg, + parameter_17.parameter_oapg, + parameter_18.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 669f09c405f..00711b8a97f 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 @@ -27,18 +27,30 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import parameter_9 +from . import parameter_10 +from . import parameter_11 +from . import parameter_12 +from . import parameter_13 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 +from . import parameter_6 +from . import parameter_7 +from . import parameter_8 +from . import parameter_14 +from . import parameter_15 +from . import parameter_16 +from . import parameter_17 +from . import parameter_18 +from . import body class RequestQueryParameters: - class Schemas: - _1 = schemas.StrSchema - aB = schemas.StrSchema - Ab = schemas.StrSchema - _self = schemas.StrSchema - a_b = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -47,11 +59,11 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + '1': typing.Union[parameter_0._1, str, ], + 'aB': typing.Union[parameter_1.aB, str, ], + 'Ab': typing.Union[parameter_2.Ab, str, ], + 'self': typing.Union[parameter_3._self, str, ], + 'A-B': typing.Union[parameter_4.a_b, str, ], }, total=False ) @@ -62,46 +74,14 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Schemas._1, - explode=True, - ), - api_client.QueryParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=Schemas.aB, - explode=True, - ), - api_client.QueryParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=Schemas.Ab, - explode=True, - ), - api_client.QueryParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=Schemas._self, - explode=True, - ), - api_client.QueryParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=Schemas.a_b, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_4.parameter_oapg, ] class RequestHeaderParameters: - class Schemas: - _1 = schemas.StrSchema - aB = schemas.StrSchema - _self = schemas.StrSchema - a_b = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -110,10 +90,10 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + '1': typing.Union[parameter_5._1, str, ], + 'aB': typing.Union[parameter_6.aB, str, ], + 'self': typing.Union[parameter_7._self, str, ], + 'A-B': typing.Union[parameter_8.a_b, str, ], }, total=False ) @@ -124,45 +104,21 @@ class RequestHeaderParameters: parameters = [ - api_client.HeaderParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._1, - ), - api_client.HeaderParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.aB, - ), - api_client.HeaderParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._self, - ), - api_client.HeaderParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.a_b, - ), + parameter_5.parameter_oapg, + parameter_6.parameter_oapg, + parameter_7.parameter_oapg, + parameter_8.parameter_oapg, ] class RequestPathParameters: - class Schemas: - _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._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, ], + '1': typing.Union[parameter_9._1, str, ], + 'aB': typing.Union[parameter_10.aB, str, ], + 'Ab': typing.Union[parameter_11.Ab, str, ], + 'self': typing.Union[parameter_12._self, str, ], + 'A-B': typing.Union[parameter_13.a_b, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -178,47 +134,14 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._1, - required=True, - ), - api_client.PathParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.aB, - required=True, - ), - api_client.PathParameter( - name="Ab", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.Ab, - required=True, - ), - api_client.PathParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas._self, - required=True, - ), - api_client.PathParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.a_b, - required=True, - ), + parameter_9.parameter_oapg, + parameter_10.parameter_oapg, + parameter_11.parameter_oapg, + parameter_12.parameter_oapg, + parameter_13.parameter_oapg, ] class RequestCookieParameters: - class Schemas: - _1 = schemas.StrSchema - aB = schemas.StrSchema - Ab = schemas.StrSchema - _self = schemas.StrSchema - a_b = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -227,11 +150,11 @@ class RequestCookieParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '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, ], + '1': typing.Union[parameter_14._1, str, ], + 'aB': typing.Union[parameter_15.aB, str, ], + 'Ab': typing.Union[parameter_16.Ab, str, ], + 'self': typing.Union[parameter_17._self, str, ], + 'A-B': typing.Union[parameter_18.a_b, str, ], }, total=False ) @@ -242,36 +165,11 @@ class RequestCookieParameters: parameters = [ - api_client.CookieParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Schemas._1, - explode=True, - ), - api_client.CookieParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=Schemas.aB, - explode=True, - ), - api_client.CookieParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=Schemas.Ab, - explode=True, - ), - api_client.CookieParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=Schemas._self, - explode=True, - ), - api_client.CookieParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=Schemas.a_b, - explode=True, - ), + parameter_14.parameter_oapg, + parameter_15.parameter_oapg, + parameter_16.parameter_oapg, + parameter_17.parameter_oapg, + parameter_18.parameter_oapg, ]_all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py new file mode 100644 index 00000000000..3d14e4d5dce --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +_1 = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=_1, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py new file mode 100644 index 00000000000..fda69b131e4 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py @@ -0,0 +1,36 @@ +# 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 + + +aB = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=aB, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py new file mode 100644 index 00000000000..0f35ddcfab7 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py @@ -0,0 +1,35 @@ +# 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 + + +_1 = schemas.StrSchema + + +parameter_oapg = api_client.HeaderParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=_1, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py new file mode 100644 index 00000000000..24c14ceed0a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py @@ -0,0 +1,35 @@ +# 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 + + +aB = schemas.StrSchema + + +parameter_oapg = api_client.HeaderParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=aB, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py new file mode 100644 index 00000000000..e0c22e3e237 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py @@ -0,0 +1,35 @@ +# 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 + + +_self = schemas.StrSchema + + +parameter_oapg = api_client.HeaderParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=_self, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py new file mode 100644 index 00000000000..22c850a1036 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py @@ -0,0 +1,35 @@ +# 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 + + +a_b = schemas.StrSchema + + +parameter_oapg = api_client.HeaderParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=a_b, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py new file mode 100644 index 00000000000..98ec9a42dda --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py @@ -0,0 +1,36 @@ +# 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 + + +_1 = schemas.StrSchema + + +parameter_oapg = api_client.CookieParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=_1, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py new file mode 100644 index 00000000000..5c2bf895542 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py @@ -0,0 +1,36 @@ +# 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 + + +aB = schemas.StrSchema + + +parameter_oapg = api_client.CookieParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=aB, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py new file mode 100644 index 00000000000..94199176481 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py @@ -0,0 +1,36 @@ +# 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 + + +Ab = schemas.StrSchema + + +parameter_oapg = api_client.CookieParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=Ab, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py new file mode 100644 index 00000000000..7da407e13ed --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py @@ -0,0 +1,36 @@ +# 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 + + +_self = schemas.StrSchema + + +parameter_oapg = api_client.CookieParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=_self, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py new file mode 100644 index 00000000000..42b0c4d69b7 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py @@ -0,0 +1,36 @@ +# 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 + + +a_b = schemas.StrSchema + + +parameter_oapg = api_client.CookieParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=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/parameter_19.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_19.py new file mode 100644 index 00000000000..22e8caf2783 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_19.py @@ -0,0 +1,36 @@ +# 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 + + +application_json = schemas.AnyTypeSchema + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py new file mode 100644 index 00000000000..9f23f416d3a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py @@ -0,0 +1,36 @@ +# 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 + + +Ab = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="Ab", + style=api_client.ParameterStyle.SIMPLE, + schema=Ab, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py new file mode 100644 index 00000000000..59d12d21bf3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py @@ -0,0 +1,36 @@ +# 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 + + +_self = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=_self, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py new file mode 100644 index 00000000000..dad40d1271e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py @@ -0,0 +1,36 @@ +# 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 + + +a_b = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=a_b, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py new file mode 100644 index 00000000000..6d65e57e30a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py @@ -0,0 +1,36 @@ +# 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 + + +_1 = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=_1, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py new file mode 100644 index 00000000000..b277f9b2e43 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py @@ -0,0 +1,36 @@ +# 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 + + +aB = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=aB, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py new file mode 100644 index 00000000000..703e00b2eb8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py @@ -0,0 +1,36 @@ +# 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 + + +Ab = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=Ab, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py new file mode 100644 index 00000000000..c73d6a3ad69 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py @@ -0,0 +1,36 @@ +# 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 + + +_self = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=_self, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py new file mode 100644 index 00000000000..06e5e8d4d12 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py @@ -0,0 +1,36 @@ +# 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 + + +a_b = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=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 ebae66731f7..2b549ff5f0d 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 @@ -28,18 +28,16 @@ from .. import path from . import response_for_200 from . import request_body +from . import parameter_0 +from . import body class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -55,12 +53,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ] _auth = [ 'petstore_auth', 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 6a3d9999ba1..336b181cc0b 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 @@ -27,18 +27,16 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import parameter_0 +from . import body class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -54,12 +52,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py new file mode 100644 index 00000000000..d03e0e890af --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +petId = schemas.Int64Schema + + +parameter_oapg = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=petId, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py new file mode 100644 index 00000000000..c88ac2fcb80 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py @@ -0,0 +1,100 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "multipart/form-data": multipart_form_data, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py index 14acb34990a..0da1014f9cb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py @@ -27,18 +27,15 @@ from .. import path from . import response_for_200 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - someParam = 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, ], + 'someParam': typing.Union[parameter_0.schema, 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( @@ -54,13 +51,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="someParam", - content={ - "application/json": Schemas.someParam, - }, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.pyi index 0d85255ec49..60127eedd6a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.pyi @@ -26,18 +26,15 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - someParam = 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, ], + 'someParam': typing.Union[parameter_0.schema, 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( @@ -53,13 +50,7 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="someParam", - content={ - "application/json": Schemas.someParam, - }, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py new file mode 100644 index 00000000000..b33dd5b4fa3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py @@ -0,0 +1,37 @@ +# 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 + + +schema = schemas.AnyTypeSchema + + +parameter_oapg = api_client.QueryParameter( + name="someParam", + content={ + "application/json": schema, + }, + 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 46e416ef744..0eeeb0ba9c9 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 @@ -28,14 +28,11 @@ from .. import path from . import response_for_200 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - mapBean = Foo - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -44,7 +41,7 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.mapBean, ], + 'mapBean': typing.Union[parameter_0.mapBean, ], }, total=False ) @@ -55,12 +52,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.mapBean, - explode=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 8ab64a9ead2..cc7651ae7d5 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 @@ -27,14 +27,11 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.foo import Foo from . import response_for_200 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - mapBean = Foo - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -43,7 +40,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[Schemas.mapBean, ], + 'mapBean': typing.Union[parameter_0.mapBean, ], }, total=False ) @@ -54,12 +51,7 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=Schemas.mapBean, - explode=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py new file mode 100644 index 00000000000..594500eecc9 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 + +from petstore_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + +from petstore_api.model.foo import Foo + + +mapBean = Foo + + +parameter_oapg = api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=mapBean, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py index 6b15a372dc5..cef21460f7f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import array_of_enums _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi index 90929867073..0d4c211ca7a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.array_of_enums import ArrayOfEnums from . import response_for_200 from . import request_body +from . import array_of_enums _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py new file mode 100644 index 00000000000..adf443c65b9 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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.array_of_enums import ArrayOfEnums + + +application_json = ArrayOfEnums + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py index 97ac4f5d5e2..071032abc6f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi index 708c0befb3e..57c2a5195f7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.animal_farm import AnimalFarm from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py new file mode 100644 index 00000000000..539fa47eba7 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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.animal_farm import AnimalFarm + + +application_json = AnimalFarm + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py index d54d0e6fcc8..b8ea5e5cd9d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi index 22dd64fad12..0144e837c29 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.boolean import Boolean from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py new file mode 100644 index 00000000000..d362f591300 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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.boolean import Boolean + + +application_json = Boolean + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py index 1767bf02a25..320dfea39ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import composed_one_of_different_types _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi index 02a2ad57c1e..023d23ec147 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDiff from . import response_for_200 from . import request_body +from . import composed_one_of_different_types _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py new file mode 100644 index 00000000000..477668cb29f --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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.composed_one_of_different_types import ComposedOneOfDifferentTypes + + +application_json = ComposedOneOfDifferentTypes + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py index 873c79d8ba7..5f1a5c77719 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi index cd7dbfa8f85..c44c26c7687 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.string_enum import StringEnum from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py new file mode 100644 index 00000000000..072f48d9e5c --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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_enum import StringEnum + + +application_json = StringEnum + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py index f860aa7df3c..90f0d6bc543 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import mammal _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi index 1c2957e4ae1..989e52e970e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.mammal import Mammal from . import response_for_200 from . import request_body +from . import mammal _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py new file mode 100644 index 00000000000..b93527d07fc --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py @@ -0,0 +1,39 @@ +# 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.mammal import Mammal + + +application_json = Mammal + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py index 2261b7c202f..8d3bf2feea5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi index 6635642d469..f91abe041d5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.number_with_validations import NumberWithValidations from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py new file mode 100644 index 00000000000..381854085f2 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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.number_with_validations import NumberWithValidations + + +application_json = NumberWithValidations + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py index c929d62a644..9fbff20b920 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi index 2321ea98623..91d70636ccf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefPro from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py new file mode 100644 index 00000000000..73455191a26 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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.object_model_with_ref_props import ObjectModelWithRefProps + + +application_json = ObjectModelWithRefProps + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py index d8ce8819827..240d92aeefb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi index c6a96d5d45d..db0caa315b4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.string import String from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py new file mode 100644 index 00000000000..d7027fb9c67 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py @@ -0,0 +1,38 @@ +# 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 import String + + +application_json = String + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, +), 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 d5f29a0df83..61eaf544c3d 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 @@ -28,138 +28,25 @@ from .. import path from . import response_for_200 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 class RequestQueryParameters: - class Schemas: - - - class pipe( - 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, - ) -> 'pipe': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class ioutil( - 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, - ) -> 'ioutil': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class http( - 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, - ) -> 'http': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class url( - 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, - ) -> 'url': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class context( - 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, - ) -> 'context': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - refParam = StringWithValidation - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '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, ], + 'pipe': typing.Union[parameter_0.pipe, list, tuple, ], + 'ioutil': typing.Union[parameter_1.ioutil, list, tuple, ], + 'http': typing.Union[parameter_2.http, list, tuple, ], + 'url': typing.Union[parameter_3.url, list, tuple, ], + 'context': typing.Union[parameter_4.context, list, tuple, ], + 'refParam': typing.Union[parameter_5.refParam, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -175,45 +62,12 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="pipe", - style=api_client.ParameterStyle.FORM, - schema=Schemas.pipe, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="ioutil", - style=api_client.ParameterStyle.FORM, - schema=Schemas.ioutil, - required=True, - ), - api_client.QueryParameter( - name="http", - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=Schemas.http, - required=True, - ), - api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=Schemas.url, - required=True, - ), - api_client.QueryParameter( - name="context", - style=api_client.ParameterStyle.FORM, - schema=Schemas.context, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="refParam", - style=api_client.ParameterStyle.FORM, - schema=Schemas.refParam, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_4.parameter_oapg, + parameter_5.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 b9eec8a5a51..554243ea8b0 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 @@ -27,138 +27,25 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.string_with_validation import StringWithValidation from . import response_for_200 +from . import parameter_0 +from . import parameter_1 +from . import parameter_2 +from . import parameter_3 +from . import parameter_4 +from . import parameter_5 class RequestQueryParameters: - class Schemas: - - - class pipe( - 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, - ) -> 'pipe': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class ioutil( - 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, - ) -> 'ioutil': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class http( - 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, - ) -> 'http': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class url( - 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, - ) -> 'url': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class context( - 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, - ) -> 'context': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - refParam = StringWithValidation - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '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, ], + 'pipe': typing.Union[parameter_0.pipe, list, tuple, ], + 'ioutil': typing.Union[parameter_1.ioutil, list, tuple, ], + 'http': typing.Union[parameter_2.http, list, tuple, ], + 'url': typing.Union[parameter_3.url, list, tuple, ], + 'context': typing.Union[parameter_4.context, list, tuple, ], + 'refParam': typing.Union[parameter_5.refParam, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -174,45 +61,12 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="pipe", - style=api_client.ParameterStyle.FORM, - schema=Schemas.pipe, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="ioutil", - style=api_client.ParameterStyle.FORM, - schema=Schemas.ioutil, - required=True, - ), - api_client.QueryParameter( - name="http", - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=Schemas.http, - required=True, - ), - api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=Schemas.url, - required=True, - ), - api_client.QueryParameter( - name="context", - style=api_client.ParameterStyle.FORM, - schema=Schemas.context, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="refParam", - style=api_client.ParameterStyle.FORM, - schema=Schemas.refParam, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, + parameter_2.parameter_oapg, + parameter_3.parameter_oapg, + parameter_4.parameter_oapg, + parameter_5.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py new file mode 100644 index 00000000000..dbc057d50dc --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py @@ -0,0 +1,61 @@ +# 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 + + + + +class pipe( + 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, + ) -> 'pipe': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="pipe", + style=api_client.ParameterStyle.FORM, + schema=pipe, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py new file mode 100644 index 00000000000..b5aeabd06c3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py @@ -0,0 +1,60 @@ +# 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 + + + + +class ioutil( + 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, + ) -> 'ioutil': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="ioutil", + style=api_client.ParameterStyle.FORM, + schema=ioutil, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py new file mode 100644 index 00000000000..f42fea174a3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py @@ -0,0 +1,60 @@ +# 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 + + + + +class http( + 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, + ) -> 'http': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="http", + style=api_client.ParameterStyle.SPACE_DELIMITED, + schema=http, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py new file mode 100644 index 00000000000..edde0d4879b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py @@ -0,0 +1,60 @@ +# 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 + + + + +class url( + 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, + ) -> 'url': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=url, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py new file mode 100644 index 00000000000..fb1be722e2a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py @@ -0,0 +1,61 @@ +# 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 + + + + +class context( + 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, + ) -> 'context': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="context", + style=api_client.ParameterStyle.FORM, + schema=context, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py new file mode 100644 index 00000000000..ef17cf0c6ea --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py @@ -0,0 +1,39 @@ +# 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 + + +refParam = StringWithValidation + + +parameter_oapg = api_client.QueryParameter( + name="refParam", + style=api_client.ParameterStyle.FORM, + schema=refParam, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py index 50216505726..2239784f5d4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi index 821c15c7775..fba7f8c90f4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/octet-stream', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py new file mode 100644 index 00000000000..f327fd2c07b --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py @@ -0,0 +1,37 @@ +# 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 + + +application_octet_stream = schemas.BinarySchema + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/octet-stream": application_octet_stream, + }, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py index 78a89109703..a4b39a330bb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi index 84512612a50..1e9efda5ac5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py new file mode 100644 index 00000000000..2d2d23bec32 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py @@ -0,0 +1,100 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "multipart/form-data": multipart_form_data, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py index 18952344aaf..3a55946a996 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import request_body +from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi index 6ea2da353d5..c517b5a8070 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py new file mode 100644 index 00000000000..067cc471651 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py @@ -0,0 +1,107 @@ +# 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 + + + + +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: ... + + @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], + ) -> 'multipart_form_data': + return super().__new__( + cls, + *args, + files=files, + _configuration=_configuration, + **kwargs, + ) + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "multipart/form-data": multipart_form_data, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py index d6cf0a3d254..5cf303633a8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py @@ -31,6 +31,7 @@ from . import response_for_200 from . import response_for_405 from . import request_body +from . import pet _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi index b740b83f419..949d6c5b2ac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi @@ -30,6 +30,7 @@ from petstore_api.model.pet import Pet from . import response_for_200 from . import response_for_405 from . import request_body +from . import pet diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py new file mode 100644 index 00000000000..b41d4bed4eb --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py @@ -0,0 +1,41 @@ +# 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.pet import Pet + + +application_json = Pet +application_xml = Pet + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + "application/xml": application_xml, + }, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py index 480f66ac869..97a4ab475b6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py @@ -32,6 +32,7 @@ from . import response_for_404 from . import response_for_405 from . import request_body +from . import pet _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi index b1c8a7c7065..5c1ebd9c6cc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi @@ -31,6 +31,7 @@ from . import response_for_400 from . import response_for_404 from . import response_for_405 from . import request_body +from . import pet diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py new file mode 100644 index 00000000000..b41d4bed4eb --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py @@ -0,0 +1,41 @@ +# 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.pet import Pet + + +application_json = Pet +application_xml = Pet + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + "application/xml": application_xml, + }, + required=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 a847042f618..5bdc29e3edb 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 @@ -28,65 +28,15 @@ from .. import path from . import response_for_200 from . import response_for_400 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - - - class status( - 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, - ) -> 'status': - 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.status, list, tuple, ], + 'status': typing.Union[parameter_0.status, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -102,12 +52,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="status", - style=api_client.ParameterStyle.FORM, - schema=Schemas.status, - required=True, - ), + parameter_0.parameter_oapg, ] _auth = [ 'http_signature_test', 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 5e51f87a486..b9e9aedf9d6 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 @@ -27,57 +27,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_400 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - - - class status( - 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, - ) -> 'status': - 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.status, list, tuple, ], + 'status': typing.Union[parameter_0.status, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -93,12 +51,7 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="status", - style=api_client.ParameterStyle.FORM, - schema=Schemas.status, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py new file mode 100644 index 00000000000..5adcac303f5 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py @@ -0,0 +1,83 @@ +# 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 + + + + +class status( + 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, + ) -> 'status': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="status", + style=api_client.ParameterStyle.FORM, + schema=status, + required=True, +), 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 592eb6fd455..a1de1d0567a 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 @@ -28,40 +28,15 @@ from .. import path from . import response_for_200 from . import response_for_400 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - - - class tags( - 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, - ) -> 'tags': - 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.tags, list, tuple, ], + 'tags': typing.Union[parameter_0.tags, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -77,12 +52,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="tags", - style=api_client.ParameterStyle.FORM, - schema=Schemas.tags, - required=True, - ), + parameter_0.parameter_oapg, ] _auth = [ 'http_signature_test', 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 9d9fadab4ca..91d1d13f274 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 @@ -27,40 +27,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_400 +from . import parameter_0 class RequestQueryParameters: - class Schemas: - - - class tags( - 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, - ) -> 'tags': - 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.tags, list, tuple, ], + 'tags': typing.Union[parameter_0.tags, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -76,12 +51,7 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="tags", - style=api_client.ParameterStyle.FORM, - schema=Schemas.tags, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py new file mode 100644 index 00000000000..855d13d8349 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py @@ -0,0 +1,58 @@ +# 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 + + + + +class tags( + 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, + ) -> 'tags': + return super().__new__( + cls, + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +parameter_oapg = api_client.QueryParameter( + name="tags", + style=api_client.ParameterStyle.FORM, + schema=tags, + required=True, +), 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 ae9794781ba..15c7b30f532 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 @@ -27,14 +27,12 @@ from .. import path from . import response_for_400 +from . import parameter_1 +from . import parameter_0 class RequestHeaderParameters: - class Schemas: - api_key = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -43,7 +41,7 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[Schemas.api_key, str, ], + 'api_key': typing.Union[parameter_0.api_key, str, ], }, total=False ) @@ -54,22 +52,14 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.HeaderParameter( - name="api_key", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.api_key, - ), + parameter_0.parameter_oapg, ] class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_1.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -85,12 +75,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_1.parameter_oapg, ] _auth = [ 'petstore_auth', 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 f241c02c509..c2d6b768ae5 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 @@ -26,14 +26,12 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_400 +from . import parameter_1 +from . import parameter_0 class RequestHeaderParameters: - class Schemas: - api_key = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -42,7 +40,7 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[Schemas.api_key, str, ], + 'api_key': typing.Union[parameter_0.api_key, str, ], }, total=False ) @@ -53,22 +51,14 @@ class RequestHeaderParameters: parameters = [ - api_client.HeaderParameter( - name="api_key", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.api_key, - ), + parameter_0.parameter_oapg, ] class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_1.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -84,12 +74,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_1.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py new file mode 100644 index 00000000000..d03e0e890af --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +petId = schemas.Int64Schema + + +parameter_oapg = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=petId, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py new file mode 100644 index 00000000000..beed13e9082 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py @@ -0,0 +1,35 @@ +# 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 + + +api_key = schemas.StrSchema + + +parameter_oapg = api_client.HeaderParameter( + name="api_key", + style=api_client.ParameterStyle.SIMPLE, + schema=api_key, +), 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 df4f58cef30..4a1ccfafcbd 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 @@ -29,18 +29,15 @@ from . import response_for_200 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,12 +53,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ] _auth = [ 'api_key', 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 6fcd25ff950..3b725e50932 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 @@ -28,18 +28,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -55,12 +52,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py new file mode 100644 index 00000000000..d03e0e890af --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +petId = schemas.Int64Schema + + +parameter_oapg = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=petId, + required=True, +), 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 0eebae72657..5ac06d7dbb1 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 @@ -28,18 +28,16 @@ from .. import path from . import response_for_405 from . import request_body +from . import parameter_0 +from . import body class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -55,12 +53,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ] _auth = [ 'petstore_auth', 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 04fb9d5faf5..8a10d770b6d 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 @@ -27,18 +27,16 @@ from petstore_api import schemas # noqa: F401 from . import response_for_405 from . import request_body +from . import parameter_0 +from . import body class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -54,12 +52,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py new file mode 100644 index 00000000000..d03e0e890af --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +petId = schemas.Int64Schema + + +parameter_oapg = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=petId, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py new file mode 100644 index 00000000000..ae4f188e184 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py @@ -0,0 +1,95 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/x-www-form-urlencoded": application_x_www_form_urlencoded, + }, +), 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 c63e30e2c01..e0ebd0f51a0 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 @@ -28,18 +28,16 @@ from .. import path from . import response_for_200 from . import request_body +from . import parameter_0 +from . import body class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -55,12 +53,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ] _auth = [ 'petstore_auth', 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 eff1bf1d746..0a51148d16f 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 @@ -27,18 +27,16 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body +from . import parameter_0 +from . import body class RequestPathParameters: - class Schemas: - petId = schemas.Int64Schema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[Schemas.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -54,12 +52,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.petId, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py new file mode 100644 index 00000000000..d03e0e890af --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +petId = schemas.Int64Schema + + +parameter_oapg = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=petId, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py new file mode 100644 index 00000000000..7be8f55e73a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py @@ -0,0 +1,95 @@ +# 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 + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "multipart/form-data": multipart_form_data, + }, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py index 6062a3b674a..52233bb5458 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py @@ -31,6 +31,7 @@ from . import response_for_200 from . import response_for_400 from . import request_body +from . import order _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi index d746aa5a746..01821c23d8e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi @@ -30,6 +30,7 @@ from petstore_api.model.order import Order from . import response_for_200 from . import response_for_400 from . import request_body +from . import order _all_accept_content_types = ( 'application/xml', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py new file mode 100644 index 00000000000..4dc2db0d718 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py @@ -0,0 +1,39 @@ +# 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.order import Order + + +application_json = Order + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + 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 e35fcccd09e..7c3d01af2af 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 @@ -27,18 +27,15 @@ from .. import path from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - order_id = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.order_id, str, ], + 'order_id': typing.Union[parameter_0.order_id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -54,12 +51,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.order_id, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '400': response_for_400.response, 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 4f968fe2616..39e42e0b437 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 @@ -26,18 +26,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - order_id = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.order_id, str, ], + 'order_id': typing.Union[parameter_0.order_id, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -53,12 +50,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.order_id, - required=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py new file mode 100644 index 00000000000..3e170d924ea --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +order_id = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=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 802d11d36b0..8210674fca9 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 @@ -29,28 +29,15 @@ from . import response_for_200 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - - - class order_id( - schemas.Int64Schema - ): - - - class MetaOapg: - format = 'int64' - inclusive_maximum = 5 - inclusive_minimum = 1 - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.order_id, decimal.Decimal, int, ], + 'order_id': typing.Union[parameter_0.order_id, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -66,12 +53,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.order_id, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 2960f72b98c..33af9e85c89 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 @@ -28,23 +28,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - - - class order_id( - schemas.Int64Schema - ): - pass - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[Schemas.order_id, decimal.Decimal, int, ], + 'order_id': typing.Union[parameter_0.order_id, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -60,12 +52,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.order_id, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py new file mode 100644 index 00000000000..e44b7db4cb6 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py @@ -0,0 +1,46 @@ +# 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 + + + + +class order_id( + schemas.Int64Schema +): + + + class MetaOapg: + format = 'int64' + inclusive_maximum = 5 + inclusive_minimum = 1 + + +parameter_oapg = api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=order_id, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py index 1714a409b53..5b872e86071 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_default from . import request_body +from . import user _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi index 605301b75b8..05f006656b4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.user import User from . import response_for_default from . import request_body +from . import user diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py new file mode 100644 index 00000000000..8b6b93f5436 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py @@ -0,0 +1,39 @@ +# 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.user import User + + +application_json = User + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py index 237c4aea51d..2539007ed42 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_default from . import request_body +from . import user _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi index 7fe43bf905e..6244f1f099e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.user import User from . import response_for_default from . import request_body +from . import user diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py new file mode 100644 index 00000000000..97f5a2d3244 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py @@ -0,0 +1,64 @@ +# 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.user import User + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py index eb7c0d373e8..da59cd7c9b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py @@ -30,6 +30,7 @@ from .. import path from . import response_for_default from . import request_body +from . import user _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi index ac124ef6712..9a88a40f16f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi @@ -29,6 +29,7 @@ from petstore_api.model.user import User from . import response_for_default from . import request_body +from . import user diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py new file mode 100644 index 00000000000..97f5a2d3244 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py @@ -0,0 +1,64 @@ +# 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.user import User + + + + +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_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), 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 720acdca5aa..d522b15ee90 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 @@ -28,20 +28,17 @@ from .. import path from . import response_for_200 from . import response_for_400 +from . import parameter_0 +from . import parameter_1 class RequestQueryParameters: - class Schemas: - username = schemas.StrSchema - password = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], - 'password': typing.Union[Schemas.password, str, ], + 'username': typing.Union[parameter_0.username, str, ], + 'password': typing.Union[parameter_1.password, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,20 +54,8 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.QueryParameter( - name="username", - style=api_client.ParameterStyle.FORM, - schema=Schemas.username, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="password", - style=api_client.ParameterStyle.FORM, - schema=Schemas.password, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 7bcf78abb8c..8d5697fa6a3 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 @@ -27,20 +27,17 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_400 +from . import parameter_0 +from . import parameter_1 class RequestQueryParameters: - class Schemas: - username = schemas.StrSchema - password = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], - 'password': typing.Union[Schemas.password, str, ], + 'username': typing.Union[parameter_0.username, str, ], + 'password': typing.Union[parameter_1.password, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,20 +53,8 @@ class RequestQueryParameters: parameters = [ - api_client.QueryParameter( - name="username", - style=api_client.ParameterStyle.FORM, - schema=Schemas.username, - required=True, - explode=True, - ), - api_client.QueryParameter( - name="password", - style=api_client.ParameterStyle.FORM, - schema=Schemas.password, - required=True, - explode=True, - ), + parameter_0.parameter_oapg, + parameter_1.parameter_oapg, ]_all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py new file mode 100644 index 00000000000..04db42da9b7 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py @@ -0,0 +1,37 @@ +# 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 + + +username = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="username", + style=api_client.ParameterStyle.FORM, + schema=username, + required=True, + explode=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py new file mode 100644 index 00000000000..a31d8119a5e --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py @@ -0,0 +1,37 @@ +# 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 + + +password = schemas.StrSchema + + +parameter_oapg = api_client.QueryParameter( + name="password", + style=api_client.ParameterStyle.FORM, + schema=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 7adff45441c..1ca671661a7 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 @@ -17,11 +17,6 @@ class Header: - class Schemas: - x_rate_limit = schemas.Int32Schema - x_expires_after = schemas.DateTimeSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { @@ -30,8 +25,8 @@ class Schemas: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'X-Rate-Limit': typing.Union[Schemas.x_rate_limit, decimal.Decimal, int, ], - 'X-Expires-After': typing.Union[Schemas.x_expires_after, str, datetime, ], + 'X-Rate-Limit': typing.Union[x_rate_limit.x_rate_limit, decimal.Decimal, int, ], + 'X-Expires-After': typing.Union[x_expires_after.x_expires_after, str, datetime, ], }, total=False ) @@ -42,16 +37,8 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.HeaderParameter( - name="X-Rate-Limit", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.x_rate_limit, - ), - api_client.HeaderParameter( - name="X-Expires-After", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.x_expires_after, - ), + x_rate_limit.parameter_oapg, + x_expires_after.parameter_oapg, ] class BodySchemas: 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 fda577bc54e..99ea33dbb11 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 @@ -27,18 +27,15 @@ from .. import path from . import response_for_200 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - username = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], + 'username': typing.Union[parameter_0.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -54,12 +51,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.username, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 bc2c0644c36..2e95a35b05a 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 @@ -26,18 +26,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - username = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], + 'username': typing.Union[parameter_0.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -53,12 +50,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.username, - required=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py new file mode 100644 index 00000000000..c64a98edbf8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +username = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=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 0e25b8c2ff7..7eae70f1fbc 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 @@ -29,18 +29,15 @@ from . import response_for_200 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - username = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], + 'username': typing.Union[parameter_0.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -56,12 +53,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.username, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '200': response_for_200.response, 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 f982869ce5e..fb69e9be7ef 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 @@ -28,18 +28,15 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_400 from . import response_for_404 +from . import parameter_0 class RequestPathParameters: - class Schemas: - username = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], + 'username': typing.Union[parameter_0.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -55,12 +52,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.username, - required=True, - ), + parameter_0.parameter_oapg, ]_all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py new file mode 100644 index 00000000000..c64a98edbf8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py @@ -0,0 +1,36 @@ +# 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 + + +username = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=username, + required=True, +), 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 7297c464701..15c65075e58 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 @@ -31,18 +31,16 @@ from . import response_for_400 from . import response_for_404 from . import request_body +from . import parameter_0 +from . import user class RequestPathParameters: - class Schemas: - username = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], + 'username': typing.Union[parameter_0.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -58,12 +56,7 @@ class Params(RequiredParams, OptionalParams): parameters = [ - api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.username, - required=True, - ), + parameter_0.parameter_oapg, ] _status_code_to_response = { '400': response_for_400.response, 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 532245c817a..06e9744e100 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 @@ -30,18 +30,16 @@ from petstore_api.model.user import User from . import response_for_400 from . import response_for_404 from . import request_body +from . import parameter_0 +from . import user class RequestPathParameters: - class Schemas: - username = schemas.StrSchema - - RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[Schemas.username, str, ], + 'username': typing.Union[parameter_0.username, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -57,12 +55,7 @@ class RequestPathParameters: parameters = [ - api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=Schemas.username, - required=True, - ), + parameter_0.parameter_oapg, ] class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py new file mode 100644 index 00000000000..1ad71e806f3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py @@ -0,0 +1,38 @@ +# 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.user import User + + +username = schemas.StrSchema + + +parameter_oapg = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=username, + required=True, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py new file mode 100644 index 00000000000..8b6b93f5436 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py @@ -0,0 +1,39 @@ +# 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.user import User + + +application_json = User + + +parameter_oapg = api_client.Parameter( + name="body", + content={ + "application/json": application_json, + }, + required=True, +), From 157c5c9c7c80a08d81216cb67e45eec759186fe9 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 15:07:03 -0700 Subject: [PATCH 03/23] Removes prependFormOrBodyParameters --- .../openapitools/codegen/DefaultCodegen.java | 46 ------------------- 1 file changed, 46 deletions(-) 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 b92825713d2..cfb2def93df 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 @@ -242,7 +242,6 @@ apiTemplateFiles are for API outputs only (controllers/handlers). protected Map specialCharReplacements = new LinkedHashMap<>(); // When a model is an alias for a simple type protected Map typeAliases = null; - protected Boolean prependFormOrBodyParameters = false; // The extension of the generated documentation files (defaults to markdown .md) protected String docExtension; protected String ignoreFilePathOverride; @@ -338,11 +337,6 @@ public void processOpts() { .get(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG).toString())); } - if (additionalProperties.containsKey(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS)) { - this.setPrependFormOrBodyParameters(Boolean.valueOf(additionalProperties - .get(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS).toString())); - } - if (additionalProperties.containsKey(CodegenConstants.ENSURE_UNIQUE_PARAMS)) { this.setEnsureUniqueParams(Boolean.valueOf(additionalProperties .get(CodegenConstants.ENSURE_UNIQUE_PARAMS).toString())); @@ -1339,15 +1333,6 @@ public Boolean getSortModelPropertiesByRequiredFlag() { public void setSortModelPropertiesByRequiredFlag(Boolean sortModelPropertiesByRequiredFlag) { this.sortModelPropertiesByRequiredFlag = sortModelPropertiesByRequiredFlag; } - - public Boolean getPrependFormOrBodyParameters() { - return prependFormOrBodyParameters; - } - - public void setPrependFormOrBodyParameters(Boolean prependFormOrBodyParameters) { - this.prependFormOrBodyParameters = prependFormOrBodyParameters; - } - public Boolean getEnsureUniqueParams() { return ensureUniqueParams; } @@ -4354,12 +4339,6 @@ public CodegenOperation fromOperation(String path, setParameterEncodingValues(cp, requestBody.getContent().get(contentType)); postProcessParameter(cp); } - // add form parameters to the beginning of all parameter list - if (prependFormOrBodyParameters) { - for (CodegenParameter cp : formParams) { - allParams.add(cp.copy()); - } - } } else { // process body parameter requestBody = ModelUtils.getReferencedRequestBody(this.openAPI, requestBody); @@ -4374,10 +4353,6 @@ public CodegenOperation fromOperation(String path, bodyParams.add(bodyParam); - if (prependFormOrBodyParameters) { - allParams.add(bodyParam); - } - // add example if (schemas != null && !isSkipOperationExample()) { op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType); @@ -4411,27 +4386,6 @@ public CodegenOperation fromOperation(String path, } } - // add form/body parameter (if any) to the end of all parameter list - if (!prependFormOrBodyParameters) { - for (CodegenParameter cp : formParams) { - if (ensureUniqueParams) { - while (!isParameterNameUnique(cp, allParams)) { - cp.paramName = generateNextName(cp.paramName); - } - } - allParams.add(cp.copy()); - } - - for (CodegenParameter cp : bodyParams) { - if (ensureUniqueParams) { - while (!isParameterNameUnique(cp, allParams)) { - cp.paramName = generateNextName(cp.paramName); - } - } - allParams.add(cp.copy()); - } - } - // create optional, required parameters for (CodegenParameter cp : allParams) { if (cp.required) { //required parameters From e84a2caf600f5818aa8c5887ed52b84e147f933a Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 15:46:57 -0700 Subject: [PATCH 04/23] Sample regenrated --- .../openapitools/codegen/DefaultCodegen.java | 12 +- .../resources/python/README_common.handlebars | 15 +- .../main/resources/python/api_doc.handlebars | 8 +- ...pi_doc_schema_fancy_schema_name.handlebars | 2 +- .../openapi3/client/petstore/python/README.md | 22 +- .../python/docs/apis/tags/AnotherFakeApi.md | 2 +- .../petstore/python/docs/apis/tags/FakeApi.md | 443 +++++------------- .../docs/apis/tags/FakeClassnameTags123Api.md | 2 +- .../petstore/python/docs/apis/tags/PetApi.md | 147 +----- .../python/docs/apis/tags/StoreApi.md | 10 +- .../petstore/python/docs/apis/tags/UserApi.md | 44 +- .../another_fake_dummy/patch/__init__.py | 1 - .../another_fake_dummy/patch/__init__.pyi | 1 - .../paths/fake/delete/__init__.py | 12 +- .../paths/fake/delete/__init__.pyi | 12 +- .../paths/fake/delete/parameter_0.py | 4 +- .../paths/fake/delete/parameter_1.py | 4 +- .../paths/fake/delete/parameter_2.py | 4 +- .../paths/fake/delete/parameter_3.py | 4 +- .../paths/fake/delete/parameter_4.py | 4 +- .../paths/fake/delete/parameter_5.py | 4 +- .../petstore_api/paths/fake/get/__init__.py | 98 +--- .../petstore_api/paths/fake/get/__init__.pyi | 98 +--- .../paths/fake/get/parameter_0.py | 6 +- .../paths/fake/get/parameter_1.py | 4 +- .../paths/fake/get/parameter_2.py | 6 +- .../paths/fake/get/parameter_3.py | 4 +- .../paths/fake/get/parameter_4.py | 4 +- .../paths/fake/get/parameter_5.py | 4 +- .../petstore_api/paths/fake/patch/__init__.py | 1 - .../paths/fake/patch/__init__.pyi | 1 - .../petstore_api/paths/fake/post/__init__.py | 84 ---- .../petstore_api/paths/fake/post/__init__.pyi | 84 ---- .../get/__init__.py | 1 - .../get/__init__.pyi | 1 - .../put/__init__.py | 1 - .../put/__init__.pyi | 1 - .../put/__init__.py | 3 +- .../put/__init__.pyi | 3 +- .../put/parameter_0.py | 4 +- .../put/__init__.py | 6 +- .../put/__init__.pyi | 6 +- .../put/parameter_0.py | 4 +- .../put/parameter_1.py | 4 +- .../put/parameter_2.py | 4 +- .../fake_classname_test/patch/__init__.py | 1 - .../fake_classname_test/patch/__init__.pyi | 1 - .../fake_delete_coffee_id/delete/__init__.py | 2 +- .../fake_delete_coffee_id/delete/__init__.pyi | 2 +- .../delete/parameter_0.py | 4 +- .../post/__init__.py | 1 - .../post/__init__.pyi | 1 - .../fake_inline_composition_/post/__init__.py | 5 +- .../post/__init__.pyi | 5 +- .../post/parameter_0.py | 6 +- .../post/parameter_1.py | 6 +- .../paths/fake_json_form_data/get/__init__.py | 84 ---- .../fake_json_form_data/get/__init__.pyi | 84 ---- .../paths/fake_json_patch/patch/__init__.py | 1 - .../paths/fake_json_patch/patch/__init__.pyi | 1 - .../fake_json_with_charset/post/__init__.py | 1 - .../fake_json_with_charset/post/__init__.pyi | 1 - .../paths/fake_obj_in_query/get/__init__.py | 2 +- .../paths/fake_obj_in_query/get/__init__.pyi | 2 +- .../fake_obj_in_query/get/parameter_0.py | 6 +- .../post/__init__.py | 39 +- .../post/__init__.pyi | 39 +- .../post/parameter_0.py | 4 +- .../post/parameter_1.py | 4 +- .../post/parameter_10.py | 4 +- .../post/parameter_11.py | 4 +- .../post/parameter_12.py | 4 +- .../post/parameter_13.py | 4 +- .../post/parameter_14.py | 4 +- .../post/parameter_15.py | 4 +- .../post/parameter_16.py | 4 +- .../post/parameter_17.py | 4 +- .../post/parameter_18.py | 4 +- .../post/parameter_2.py | 4 +- .../post/parameter_3.py | 4 +- .../post/parameter_4.py | 4 +- .../post/parameter_5.py | 4 +- .../post/parameter_6.py | 4 +- .../post/parameter_7.py | 4 +- .../post/parameter_8.py | 4 +- .../post/parameter_9.py | 4 +- .../post/__init__.py | 88 +--- .../post/__init__.pyi | 88 +--- .../post/parameter_0.py | 4 +- .../fake_ref_obj_in_query/get/__init__.py | 2 +- .../fake_ref_obj_in_query/get/__init__.pyi | 2 +- .../fake_ref_obj_in_query/get/parameter_0.py | 4 +- .../fake_refs_array_of_enums/post/__init__.py | 1 - .../post/__init__.pyi | 1 - .../fake_refs_arraymodel/post/__init__.py | 1 - .../fake_refs_arraymodel/post/__init__.pyi | 1 - .../paths/fake_refs_boolean/post/__init__.py | 1 - .../paths/fake_refs_boolean/post/__init__.pyi | 1 - .../post/__init__.py | 1 - .../post/__init__.pyi | 1 - .../paths/fake_refs_enum/post/__init__.py | 1 - .../paths/fake_refs_enum/post/__init__.pyi | 1 - .../paths/fake_refs_mammal/post/__init__.py | 1 - .../paths/fake_refs_mammal/post/__init__.pyi | 1 - .../paths/fake_refs_number/post/__init__.py | 1 - .../paths/fake_refs_number/post/__init__.pyi | 1 - .../post/__init__.py | 1 - .../post/__init__.pyi | 1 - .../paths/fake_refs_string/post/__init__.py | 1 - .../paths/fake_refs_string/post/__init__.pyi | 1 - .../fake_test_query_paramters/put/__init__.py | 12 +- .../put/__init__.pyi | 12 +- .../put/parameter_0.py | 6 +- .../put/parameter_1.py | 6 +- .../put/parameter_2.py | 6 +- .../put/parameter_3.py | 6 +- .../put/parameter_4.py | 6 +- .../put/parameter_5.py | 4 +- .../post/__init__.py | 1 - .../post/__init__.pyi | 1 - .../paths/fake_upload_file/post/__init__.py | 83 ---- .../paths/fake_upload_file/post/__init__.pyi | 83 ---- .../paths/fake_upload_files/post/__init__.py | 83 ---- .../paths/fake_upload_files/post/__init__.pyi | 83 ---- .../petstore_api/paths/pet/post/__init__.py | 1 - .../petstore_api/paths/pet/post/__init__.pyi | 1 - .../petstore_api/paths/pet/put/__init__.py | 1 - .../petstore_api/paths/pet/put/__init__.pyi | 1 - .../paths/pet_find_by_status/get/__init__.py | 2 +- .../paths/pet_find_by_status/get/__init__.pyi | 2 +- .../pet_find_by_status/get/parameter_0.py | 6 +- .../paths/pet_find_by_tags/get/__init__.py | 2 +- .../paths/pet_find_by_tags/get/__init__.pyi | 2 +- .../paths/pet_find_by_tags/get/parameter_0.py | 6 +- .../paths/pet_pet_id/delete/__init__.py | 4 +- .../paths/pet_pet_id/delete/__init__.pyi | 4 +- .../paths/pet_pet_id/delete/parameter_0.py | 4 +- .../paths/pet_pet_id/delete/parameter_1.py | 4 +- .../paths/pet_pet_id/get/__init__.py | 2 +- .../paths/pet_pet_id/get/__init__.pyi | 2 +- .../paths/pet_pet_id/get/parameter_0.py | 4 +- .../paths/pet_pet_id/post/__init__.py | 80 +--- .../paths/pet_pet_id/post/__init__.pyi | 80 +--- .../paths/pet_pet_id/post/parameter_0.py | 4 +- .../pet_pet_id_upload_image/post/__init__.py | 88 +--- .../pet_pet_id_upload_image/post/__init__.pyi | 88 +--- .../post/parameter_0.py | 4 +- .../paths/store_order/post/__init__.py | 1 - .../paths/store_order/post/__init__.pyi | 1 - .../store_order_order_id/delete/__init__.py | 2 +- .../store_order_order_id/delete/__init__.pyi | 2 +- .../delete/parameter_0.py | 4 +- .../store_order_order_id/get/__init__.py | 2 +- .../store_order_order_id/get/__init__.pyi | 2 +- .../store_order_order_id/get/parameter_0.py | 4 +- .../petstore_api/paths/user/post/__init__.py | 1 - .../petstore_api/paths/user/post/__init__.pyi | 1 - .../user_create_with_array/post/__init__.py | 1 - .../user_create_with_array/post/__init__.pyi | 1 - .../user_create_with_list/post/__init__.py | 1 - .../user_create_with_list/post/__init__.pyi | 1 - .../paths/user_login/get/__init__.py | 4 +- .../paths/user_login/get/__init__.pyi | 4 +- .../paths/user_login/get/parameter_0.py | 4 +- .../paths/user_login/get/parameter_1.py | 4 +- .../paths/user_login/get/response_for_200.py | 4 +- .../paths/user_username/delete/__init__.py | 2 +- .../paths/user_username/delete/__init__.pyi | 2 +- .../paths/user_username/delete/parameter_0.py | 4 +- .../paths/user_username/get/__init__.py | 2 +- .../paths/user_username/get/__init__.pyi | 2 +- .../paths/user_username/get/parameter_0.py | 4 +- .../paths/user_username/put/__init__.py | 3 +- .../paths/user_username/put/__init__.pyi | 3 +- .../paths/user_username/put/parameter_0.py | 4 +- 175 files changed, 464 insertions(+), 2155 deletions(-) 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 cfb2def93df..e5f04775754 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 @@ -4395,6 +4395,14 @@ public CodegenOperation fromOperation(String path, op.hasOptionalParams = true; } } + if (bodyParam != null) { + if (bodyParam.required) { + requiredParams.add(bodyParam.copy()); + } else { + optionalParams.add(bodyParam.copy()); + op.hasOptionalParams = true; + } + } // add imports to operation import tag for (String i : imports) { @@ -4800,9 +4808,9 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) parameterModelName = getParameterDataType(parameter, parameterSchema); CodegenProperty prop; if (getUseInlineModelResolver()) { - prop = fromProperty(parameter.getName(), getReferencedSchemaWhenNotEnum(parameterSchema), false); + prop = fromProperty("schema", getReferencedSchemaWhenNotEnum(parameterSchema), false); } else { - prop = fromProperty(parameter.getName(), parameterSchema, false); + prop = fromProperty("schema", parameterSchema, false); } codegenParameter.setSchema(prop); if (addSchemaImportsFromV3SpecLocations) { diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars index bb33cc728d5..f5f635bb240 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars @@ -14,20 +14,7 @@ from {{packageName}}.{{apiPackage}}.tags import {{classFilename}} {{#each operation}} {{#if @first}} {{> doc_auth_partial}} - -# Enter a context with an instance of the API client -with {{{packageName}}}.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = {{classFilename}}.{{{classname}}}(api_client) - {{#each allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{#unless required}} (optional){{/unless}}{{#if defaultValue}} (default to {{{.}}}){{/if}} - {{/each}} - - try: - {{#if summary}} # {{{summary}}} - {{/if}} {{#if returnType}}api_response = {{/if}}api_instance.{{{operationId}}}({{#each allParams}}{{#if required}}{{paramName}}{{/if}}{{#unless required}}{{paramName}}={{paramName}}{{/unless}}{{#if hasMore}}, {{/if}}{{/each}}){{#if returnType}} - pprint(api_response){{/if}} - except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) +{{> api_doc_example }} {{/if}} {{/each}} {{/with}} 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 60134a4a78a..47d0dea55a7 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 @@ -44,7 +44,7 @@ Method | HTTP request | Description {{/if}} {{> api_doc_example }} ### Parameters -{{#if allParams}} +{{#or bodyParam queryParams headerParams pathParams cookieParams}} Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -96,12 +96,12 @@ skip_deserialization | bool | default is False | when True, headers and body wil 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}} +{{baseName}} | [{{paramName}}.schema](#{{../operationId}}.{{paramName}}.schema) | | {{#unless required}}optional{{/unless}} {{/each}} {{#each queryParams}} {{#with schema}} -{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestQueryParameters.Schemas." complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1=../paramName complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} @@ -155,7 +155,7 @@ Key | Input Type | Description | Notes {{/if}} {{else}} This endpoint does not need any parameter. -{{/if}} +{{/or}} ### Return Types, Responses 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 index e3fc10e3e84..2aa281a2010 100644 --- 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 @@ -1 +1 @@ -{{schemaNamePrefix1}}{{#if schemaNamePrefix2}}{{schemaNamePrefix2}}{{/if}}{{#if schemaNamePrefix3}}{{schemaNamePrefix3}}{{/if}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}} \ No newline at end of file +{{schemaNamePrefix1}}{{#if schemaNamePrefix2}}{{schemaNamePrefix2}}{{/if}}{{#if schemaNamePrefix3}}{{schemaNamePrefix3}}{{/if}}{{#unless schemaNamePrefix2 schemaNamePrefix3}}.{{/unless}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index ca7562b37e7..db2f350a411 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -148,22 +148,36 @@ configuration = petstore_api.Configuration( host = "http://petstore.swagger.io:80/v2" ) +```python +import petstore_api +from petstore_api.apis.tags import another_fake_api +from petstore_api.model.client import Client +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = another_fake_api.AnotherFakeApi(api_client) - client = Client( - client="client_example", - ) # Client | client model + # example passing only required values which don't have defaults set + body = Client( + client="client_example", + ) try: # To test special tags - api_response = api_instance.call_123_test_special_tags(client) + api_response = api_instance.call_123_test_special_tags( + body=body, + ) pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` +``` ## Documentation for API Endpoints 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 35977ee2192..1371fa40784 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md @@ -58,7 +58,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index f0f0bd79cfb..7d8f959b441 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -90,7 +90,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -171,7 +171,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -252,7 +252,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -336,7 +336,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**FileSchemaTestClass**](../../models/FileSchemaTestClass.md) | | @@ -424,7 +424,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -435,10 +435,10 @@ Type | Description | Notes Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query | [RequestQueryParameters.Schemas.query](#body_with_query_params.RequestQueryParameters.Schemas.query) | | +query | [parameter_0.schema](#body_with_query_params.parameter_0.schema) | | -# RequestQueryParameters.Schemas.query +# parameter_0.items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -512,7 +512,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**Boolean**](../../models/Boolean.md) | | @@ -594,26 +594,26 @@ skip_deserialization | bool | default is False | when True, headers and body wil 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) | | -some_var | [RequestQueryParameters.Schemas.some_var](#case_sensitive_params.RequestQueryParameters.Schemas.some_var) | | +someVar | [parameter_0.schema](#case_sensitive_params.parameter_0.schema) | | +SomeVar | [parameter_1.schema](#case_sensitive_params.parameter_1.schema) | | +some_var | [parameter_2.schema](#case_sensitive_params.parameter_2.schema) | | -# RequestQueryParameters.Schemas.someVar +# parameter_0.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.SomeVar +# parameter_1.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.some_var +# parameter_2.items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -691,7 +691,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -770,7 +770,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -852,9 +852,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -id | [RequestPathParameters.Schemas.id](#delete_coffee.RequestPathParameters.Schemas.id) | | +id | [RequestPathParameters.Schemas.items](#delete_coffee.RequestPathParameters.Schemas.items) | | -# RequestPathParameters.Schemas.id +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -924,68 +924,15 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example passing only optional values - body = dict( - integer=10, - int32=20, - int64=1, - number=32.1, - _float=3.14, - double=67.8, - string="a", - pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", - byte='YQ==', - binary=open('/path/to/file', 'rb'), - date="1970-01-01", - date_time="2020-02-02T20:20:20.222220Z", - password="password_example", - callback="callback_example", - ) + # example, this endpoint has no required or optional parameters try: # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_response = api_instance.endpoint_parameters( - body=body, - ) + api_response = api_instance.endpoint_parameters() except petstore_api.ApiException as e: print("Exception when calling FakeApi->endpoint_parameters: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -[body](#endpoint_parameters.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#endpoint_parameters.request_body.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 - -# request_body.application_x_www_form_urlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**number** | decimal.Decimal, int, float, | decimal.Decimal, | None | -**pattern_without_delimiter** | str, | str, | None | -**byte** | str, | str, | None | -**double** | decimal.Decimal, int, float, | decimal.Decimal, | None | value must be a 64 bit float -**integer** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] -**int32** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] value must be a 32 bit integer -**int64** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] value must be a 64 bit integer -**float** | decimal.Decimal, int, float, | decimal.Decimal, | None | [optional] value must be a 32 bit float -**string** | str, | str, | None | [optional] -**binary** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | None | [optional] -**date** | str, date, | str, | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**dateTime** | str, datetime, | str, | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.11111+01:00value must conform to RFC-3339 date-time -**password** | str, | str, | None | [optional] -**callback** | str, | str, | None | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] +This endpoint does not need any parameter. ### Return Types, Responses @@ -1054,18 +1001,11 @@ with petstore_api.ApiClient(configuration) as api_client: ], 'enum_header_string': "-efg", } - body = dict( - enum_form_string_array=[ - "$" - ], - enum_form_string="-efg", - ) try: # To test enum parameters api_response = api_instance.enum_parameters( query_params=query_params, header_params=header_params, - body=body, ) except petstore_api.ApiException as e: print("Exception when calling FakeApi->enum_parameters: %s\n" % e) @@ -1074,56 +1014,24 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -[body](#enum_parameters.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#enum_parameters.request_body.application_x_www_form_urlencoded), Unset] | optional, default is unset | [query_params](#enum_parameters.RequestQueryParameters) | [RequestQueryParameters.Params](#enum_parameters.RequestQueryParameters.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 skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body - -# request_body.application_x_www_form_urlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[enum_form_string_array](#enum_form_string_array)** | list, tuple, | tuple, | Form parameter enum test (string array) | [optional] -**enum_form_string** | str, | str, | Form parameter enum test (string) | [optional] must be one of ["_abc", "-efg", "(xyz)", ] if omitted the server will use the default value of "-efg" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# enum_form_string_array - -Form parameter enum test (string array) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Form parameter enum test (string array) | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of [">", "$", ] if omitted the server will use the default value of "$" - ### query_params #### RequestQueryParameters.Params 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 -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 +enum_query_string_array | [parameter_2.schema](#enum_parameters.parameter_2.schema) | | optional +enum_query_string | [parameter_3.schema](#enum_parameters.parameter_3.schema) | | optional +enum_query_integer | [parameter_4.schema](#enum_parameters.parameter_4.schema) | | optional +enum_query_double | [parameter_5.schema](#enum_parameters.parameter_5.schema) | | optional -# RequestQueryParameters.Schemas.enum_query_string_array +# parameter_2.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1135,21 +1043,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 "$" -# RequestQueryParameters.Schemas.enum_query_string +# parameter_3.schema ## 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" -# RequestQueryParameters.Schemas.enum_query_integer +# parameter_4.schema ## 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 -# RequestQueryParameters.Schemas.enum_query_double +# parameter_5.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1161,10 +1069,10 @@ decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [1.1, -1.2 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 +enum_header_string_array | [RequestHeaderParameters.Schemas.schema](#enum_parameters.RequestHeaderParameters.Schemas.schema) | | optional +enum_header_string | [RequestHeaderParameters.Schemas.schema](#enum_parameters.RequestHeaderParameters.Schemas.schema) | | optional -# RequestHeaderParameters.Schemas.enum_header_string_array +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1176,7 +1084,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 "$" -# RequestHeaderParameters.Schemas.enum_header_string +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1356,34 +1264,34 @@ skip_deserialization | bool | default is False | when True, headers and body wil 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) | | -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 +required_string_group | [parameter_0.schema](#group_parameters.parameter_0.schema) | | +required_int64_group | [parameter_2.schema](#group_parameters.parameter_2.schema) | | +string_group | [parameter_3.schema](#group_parameters.parameter_3.schema) | | optional +int64_group | [parameter_5.schema](#group_parameters.parameter_5.schema) | | optional -# RequestQueryParameters.Schemas.required_string_group +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | -# RequestQueryParameters.Schemas.required_int64_group +# parameter_2.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer -# RequestQueryParameters.Schemas.string_group +# parameter_3.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | -# RequestQueryParameters.Schemas.int64_group +# parameter_5.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1395,17 +1303,17 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer 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 +required_boolean_group | [RequestHeaderParameters.Schemas.schema](#group_parameters.RequestHeaderParameters.Schemas.schema) | | +boolean_group | [RequestHeaderParameters.Schemas.schema](#group_parameters.RequestHeaderParameters.Schemas.schema) | | optional -# RequestHeaderParameters.Schemas.required_boolean_group +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | -# RequestHeaderParameters.Schemas.boolean_group +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1478,7 +1386,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1564,7 +1472,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1584,7 +1492,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# request_body.multipart_form_data +# request_body..multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1622,11 +1530,11 @@ str, | str, | | 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 +compositionAtRoot | [parameter_0.schema](#inline_composition.parameter_0.schema) | | optional +compositionInProperty | [parameter_1.schema](#inline_composition.parameter_1.schema) | | optional -# RequestQueryParameters.Schemas.compositionAtRoot +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1646,7 +1554,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.compositionInProperty +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1774,44 +1682,15 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example passing only optional values - body = dict( - param="param_example", - param2="param2_example", - ) + # example, this endpoint has no required or optional parameters try: # test json serialization of form data - api_response = api_instance.json_form_data( - body=body, - ) + api_response = api_instance.json_form_data() except petstore_api.ApiException as e: print("Exception when calling FakeApi->json_form_data: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -[body](#json_form_data.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#json_form_data.request_body.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 - -# request_body.application_x_www_form_urlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**param** | str, | str, | field1 | -**param2** | str, | str, | field2 | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] +This endpoint does not need any parameter. ### Return Types, Responses @@ -1882,7 +1761,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json_patchjson +# request_body..application_json_patchjson Type | Description | Notes ------------- | ------------- | ------------- [**JSONPatchRequest**](../../models/JSONPatchRequest.md) | | @@ -1954,7 +1833,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json_charsetutf_8 +# request_body..application_json_charsetutf_8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2039,7 +1918,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -2118,7 +1997,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2200,10 +2079,10 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -mapBean | [RequestQueryParameters.Schemas.mapBean](#object_in_query.RequestQueryParameters.Schemas.mapBean) | | optional +mapBean | [parameter_0.schema](#object_in_query.parameter_0.schema) | | optional -# RequestQueryParameters.Schemas.mapBean +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2287,7 +2166,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2426,7 +2305,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2438,42 +2317,42 @@ dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal 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 -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 +1 | [parameter_0.schema](#parameter_collisions.parameter_0.schema) | | optional +aB | [parameter_1.schema](#parameter_collisions.parameter_1.schema) | | optional +Ab | [parameter_2.schema](#parameter_collisions.parameter_2.schema) | | optional +self | [parameter_3.schema](#parameter_collisions.parameter_3.schema) | | optional +A-B | [parameter_4.schema](#parameter_collisions.parameter_4.schema) | | optional -# RequestQueryParameters.Schemas._1 +# parameter_0.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.aB +# parameter_1.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.Ab +# parameter_2.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas._self +# parameter_3.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.a_b +# parameter_4.items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2485,33 +2364,33 @@ str, | str, | | 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 -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.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional +aB | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional +self | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional +A-B | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional -# RequestHeaderParameters.Schemas._1 +# RequestHeaderParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas.aB +# RequestHeaderParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas._self +# RequestHeaderParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas.a_b +# RequestHeaderParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2523,41 +2402,41 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -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.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | +aB | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | +Ab | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | +self | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | +A-B | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | -# RequestPathParameters.Schemas._1 +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas.aB +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas.Ab +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas._self +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas.a_b +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2569,41 +2448,41 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -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.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional +aB | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional +Ab | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional +self | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional +A-B | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional -# RequestCookieParameters.Schemas._1 +# RequestCookieParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas.aB +# RequestCookieParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas.Ab +# RequestCookieParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas._self +# RequestCookieParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas.a_b +# RequestCookieParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2687,7 +2566,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -someParam | | | +someParam | [parameter_0.schema](#query_param_with_json_content_type.parameter_0.schema) | | ### Return Types, Responses @@ -2781,15 +2660,15 @@ skip_deserialization | bool | default is False | when True, headers and body wil 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) | | -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) | | +pipe | [parameter_0.schema](#query_parameter_collection_format.parameter_0.schema) | | +ioutil | [parameter_1.schema](#query_parameter_collection_format.parameter_1.schema) | | +http | [parameter_2.schema](#query_parameter_collection_format.parameter_2.schema) | | +url | [parameter_3.schema](#query_parameter_collection_format.parameter_3.schema) | | +context | [parameter_4.schema](#query_parameter_collection_format.parameter_4.schema) | | +refParam | [parameter_5.schema](#query_parameter_collection_format.parameter_5.schema) | | -# RequestQueryParameters.Schemas.pipe +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2801,7 +2680,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# RequestQueryParameters.Schemas.ioutil +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2813,7 +2692,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# RequestQueryParameters.Schemas.http +# parameter_2.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2825,7 +2704,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# RequestQueryParameters.Schemas.url +# parameter_3.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2837,7 +2716,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# RequestQueryParameters.Schemas.context +# parameter_4.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2849,7 +2728,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- items | str, | str, | | -# RequestQueryParameters.Schemas.refParam +# parameter_5.schema Type | Description | Notes ------------- | ------------- | ------------- [**StringWithValidation**](../../models/StringWithValidation.md) | | @@ -2926,10 +2805,10 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -mapBean | [RequestQueryParameters.Schemas.mapBean](#ref_object_in_query.RequestQueryParameters.Schemas.mapBean) | | optional +mapBean | [parameter_0.schema](#ref_object_in_query.parameter_0.schema) | | optional -# RequestQueryParameters.Schemas.mapBean +# parameter_0.schema Type | Description | Notes ------------- | ------------- | ------------- [**Foo**](../../models/Foo.md) | | @@ -3054,7 +2933,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**String**](../../models/String.md) | | @@ -3133,7 +3012,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3211,7 +3090,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_octet_stream +# request_body..application_octet_stream file to upload @@ -3271,46 +3150,16 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example passing only optional values - body = dict( - additional_metadata="additional_metadata_example", - file=open('/path/to/file', 'rb'), - ) + # example, this endpoint has no required or optional parameters try: # uploads a file using multipart/form-data - api_response = api_instance.upload_file( - body=body, - ) + api_response = api_instance.upload_file() pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_file: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -[body](#upload_file.request_body) | typing.Union[[request_body.multipart_form_data](#upload_file.request_body.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 - -# request_body.multipart_form_data - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | -**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] +This endpoint does not need any parameter. ### Return Types, Responses @@ -3360,58 +3209,16 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example passing only optional values - body = dict( - files=[ - open('/path/to/file', 'rb') - ], - ) + # example, this endpoint has no required or optional parameters try: # uploads files using multipart/form-data - api_response = api_instance.upload_files( - body=body, - ) + api_response = api_instance.upload_files() pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_files: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -[body](#upload_files.request_body) | typing.Union[[request_body.multipart_form_data](#upload_files.request_body.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 - -# request_body.multipart_form_data - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[files](#files)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# files - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | +This endpoint does not need any parameter. ### Return Types, Responses 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 70ab394877f..ebc9ed7f5fd 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md @@ -69,7 +69,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..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 ddd5855f10e..b71d0b02c72 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -151,13 +151,13 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# request_body.application_xml +# request_body..application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -270,9 +270,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -api_key | [RequestHeaderParameters.Schemas.api_key](#delete_pet.RequestHeaderParameters.Schemas.api_key) | | optional +api_key | [RequestHeaderParameters.Schemas.items](#delete_pet.RequestHeaderParameters.Schemas.items) | | optional -# RequestHeaderParameters.Schemas.api_key +# RequestHeaderParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -284,9 +284,9 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.petId](#delete_pet.RequestPathParameters.Schemas.petId) | | +petId | [RequestPathParameters.Schemas.schema](#delete_pet.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas.petId +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -438,10 +438,10 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -status | [RequestQueryParameters.Schemas.status](#find_pets_by_status.RequestQueryParameters.Schemas.status) | | +status | [parameter_0.schema](#find_pets_by_status.parameter_0.schema) | | -# RequestQueryParameters.Schemas.status +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -630,10 +630,10 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -tags | [RequestQueryParameters.Schemas.tags](#find_pets_by_tags.RequestQueryParameters.Schemas.tags) | | +tags | [parameter_0.schema](#find_pets_by_tags.parameter_0.schema) | | -# RequestQueryParameters.Schemas.tags +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -760,9 +760,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.petId](#get_pet_by_id.RequestPathParameters.Schemas.petId) | | +petId | [RequestPathParameters.Schemas.schema](#get_pet_by_id.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas.petId +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -951,13 +951,13 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# request_body.application_xml +# request_body..application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -1043,59 +1043,24 @@ with petstore_api.ApiClient(configuration) as api_client: ) except petstore_api.ApiException as e: print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - body = dict( - name="name_example", - status="status_example", - ) - try: - # Updates a pet in the store with form data - api_response = api_instance.update_pet_with_form( - path_params=path_params, - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -[body](#update_pet_with_form.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#update_pet_with_form.request_body.application_x_www_form_urlencoded), Unset] | optional, default is unset | [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 skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body - -# request_body.application_x_www_form_urlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | Updated name of the pet | [optional] -**status** | str, | str, | Updated status of the pet | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - ### path_params #### RequestPathParameters.Params Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.petId](#update_pet_with_form.RequestPathParameters.Schemas.petId) | | +petId | [RequestPathParameters.Schemas.schema](#update_pet_with_form.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas.petId +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1167,61 +1132,25 @@ with petstore_api.ApiClient(configuration) as api_client: pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - body = dict( - additional_metadata="additional_metadata_example", - required_file=open('/path/to/file', 'rb'), - ) - try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file( - path_params=path_params, - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -[body](#upload_file_with_required_file.request_body) | typing.Union[[request_body.multipart_form_data](#upload_file_with_required_file.request_body.multipart_form_data), Unset] | optional, default is unset | [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 timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body - -# request_body.multipart_form_data - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**requiredFile** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | -**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - ### path_params #### RequestPathParameters.Params Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.petId](#upload_file_with_required_file.RequestPathParameters.Schemas.petId) | | +petId | [RequestPathParameters.Schemas.schema](#upload_file_with_required_file.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas.petId +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1299,61 +1228,25 @@ with petstore_api.ApiClient(configuration) as api_client: pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_image: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - body = dict( - additional_metadata="additional_metadata_example", - file=open('/path/to/file', 'rb'), - ) - try: - # uploads an image - api_response = api_instance.upload_image( - path_params=path_params, - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_image: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -[body](#upload_image.request_body) | typing.Union[[request_body.multipart_form_data](#upload_image.request_body.multipart_form_data), Unset] | optional, default is unset | [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 timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### body - -# request_body.multipart_form_data - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - ### path_params #### RequestPathParameters.Params Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.petId](#upload_image.RequestPathParameters.Schemas.petId) | | +petId | [RequestPathParameters.Schemas.schema](#upload_image.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas.petId +# RequestPathParameters.Schemas..schema ## 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 f66bfcf1dac..553271a8961 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -60,9 +60,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | [RequestPathParameters.Schemas.order_id](#delete_order.RequestPathParameters.Schemas.order_id) | | +order_id | [RequestPathParameters.Schemas.items](#delete_order.RequestPathParameters.Schemas.items) | | -# RequestPathParameters.Schemas.order_id +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -227,9 +227,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | [RequestPathParameters.Schemas.order_id](#get_order_by_id.RequestPathParameters.Schemas.order_id) | | +order_id | [RequestPathParameters.Schemas.schema](#get_order_by_id.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas.order_id +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -338,7 +338,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..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 0ac7d426b37..04533d9df7a 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -75,7 +75,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -162,7 +162,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -255,7 +255,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -337,9 +337,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.username](#delete_user.RequestPathParameters.Schemas.username) | | +username | [RequestPathParameters.Schemas.items](#delete_user.RequestPathParameters.Schemas.items) | | -# RequestPathParameters.Schemas.username +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -424,9 +424,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.username](#get_user_by_name.RequestPathParameters.Schemas.username) | | +username | [RequestPathParameters.Schemas.items](#get_user_by_name.RequestPathParameters.Schemas.items) | | -# RequestPathParameters.Schemas.username +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -532,18 +532,18 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestQueryParameters.Schemas.username](#login_user.RequestQueryParameters.Schemas.username) | | -password | [RequestQueryParameters.Schemas.password](#login_user.RequestQueryParameters.Schemas.password) | | +username | [parameter_0.schema](#login_user.parameter_0.schema) | | +password | [parameter_1.schema](#login_user.parameter_1.schema) | | -# RequestQueryParameters.Schemas.username +# parameter_0.items ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestQueryParameters.Schemas.password +# parameter_1.items ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -582,26 +582,22 @@ str, | str, | | Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -X-Rate-Limit | X-Rate-Limit | | optional -X-Expires-After | X-Expires-After | | optional +X-Rate-Limit | schema | | optional +X-Expires-After | schema | | optional -# X-Rate-Limit - -calls per hour allowed by the user +# schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | calls per hour allowed by the user | value must be a 32 bit integer - -# X-Expires-After +decimal.Decimal, int, | decimal.Decimal, | | value must be a 32 bit integer -date in UTC when token expires +# schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -str, datetime, | str, | date in UTC when token expires | value must conform to RFC-3339 date-time +str, datetime, | str, | | value must conform to RFC-3339 date-time #### response_for_400.ApiResponse @@ -735,7 +731,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body.application_json +# request_body..application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -746,9 +742,9 @@ Type | Description | Notes Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.username](#update_user.RequestPathParameters.Schemas.username) | | +username | [RequestPathParameters.Schemas.items](#update_user.RequestPathParameters.Schemas.items) | | -# RequestPathParameters.Schemas.username +# RequestPathParameters.Schemas..items ## Model Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py index 5c3b5c65d61..e900456505b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import client _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi index 50417997373..1a5cd51dba2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.client import Client from . import response_for_200 from . import request_body -from . import client _all_accept_content_types = ( 'application/json', 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 f5c80c14afe..aee804a7179 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 @@ -40,15 +40,15 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_string_group': typing.Union[parameter_0.required_string_group, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[parameter_2.required_int64_group, decimal.Decimal, int, ], + 'required_string_group': typing.Union[parameter_0.schema, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[parameter_2.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'string_group': typing.Union[parameter_3.string_group, decimal.Decimal, int, ], - 'int64_group': typing.Union[parameter_5.int64_group, decimal.Decimal, int, ], + 'string_group': typing.Union[parameter_3.schema, decimal.Decimal, int, ], + 'int64_group': typing.Union[parameter_5.schema, decimal.Decimal, int, ], }, total=False ) @@ -69,13 +69,13 @@ class RequestHeaderParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_boolean_group': typing.Union[parameter_1.required_boolean_group, bool, ], + 'required_boolean_group': typing.Union[parameter_1.schema, bool, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'boolean_group': typing.Union[parameter_4.boolean_group, bool, ], + 'boolean_group': typing.Union[parameter_4.schema, bool, ], }, total=False ) 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 24fa5daab55..a3ad73d6138 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 @@ -39,15 +39,15 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_string_group': typing.Union[parameter_0.required_string_group, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[parameter_2.required_int64_group, decimal.Decimal, int, ], + 'required_string_group': typing.Union[parameter_0.schema, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[parameter_2.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'string_group': typing.Union[parameter_3.string_group, decimal.Decimal, int, ], - 'int64_group': typing.Union[parameter_5.int64_group, decimal.Decimal, int, ], + 'string_group': typing.Union[parameter_3.schema, decimal.Decimal, int, ], + 'int64_group': typing.Union[parameter_5.schema, decimal.Decimal, int, ], }, total=False ) @@ -68,13 +68,13 @@ class RequestHeaderParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'required_boolean_group': typing.Union[parameter_1.required_boolean_group, bool, ], + 'required_boolean_group': typing.Union[parameter_1.schema, bool, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'boolean_group': typing.Union[parameter_4.boolean_group, bool, ], + 'boolean_group': typing.Union[parameter_4.schema, bool, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py index 66da152b6e8..86cb00fb098 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -required_string_group = schemas.IntSchema +schema = schemas.IntSchema parameter_oapg = api_client.QueryParameter( name="required_string_group", style=api_client.ParameterStyle.FORM, - schema=required_string_group, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py index 247bfbe313a..aee1f622f9a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -required_boolean_group = schemas.BoolSchema +schema = schemas.BoolSchema parameter_oapg = api_client.HeaderParameter( name="required_boolean_group", style=api_client.ParameterStyle.SIMPLE, - schema=required_boolean_group, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py index 4f6e9f3d9f6..88ad9d94fe3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -required_int64_group = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.QueryParameter( name="required_int64_group", style=api_client.ParameterStyle.FORM, - schema=required_int64_group, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py index e99c1a50c25..add557e857f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -string_group = schemas.IntSchema +schema = schemas.IntSchema parameter_oapg = api_client.QueryParameter( name="string_group", style=api_client.ParameterStyle.FORM, - schema=string_group, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py index d19cd18a53b..34bacb5d51b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -boolean_group = schemas.BoolSchema +schema = schemas.BoolSchema parameter_oapg = api_client.HeaderParameter( name="boolean_group", style=api_client.ParameterStyle.SIMPLE, - schema=boolean_group, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py index 147a25113cb..dd78bf878ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -int64_group = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.QueryParameter( name="int64_group", style=api_client.ParameterStyle.FORM, - schema=int64_group, + schema=schema, explode=True, ), 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 5b35d4baee7..740a51c5b2d 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 @@ -28,14 +28,12 @@ from .. import path from . import response_for_200 from . import response_for_404 -from . import request_body from . import parameter_0 from . import parameter_1 from . import parameter_2 from . import parameter_3 from . import parameter_4 from . import parameter_5 -from . import body @@ -48,10 +46,10 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_query_string_array': typing.Union[parameter_2.enum_query_string_array, list, tuple, ], - 'enum_query_string': typing.Union[parameter_3.enum_query_string, str, ], - 'enum_query_integer': typing.Union[parameter_4.enum_query_integer, decimal.Decimal, int, ], - 'enum_query_double': typing.Union[parameter_5.enum_query_double, decimal.Decimal, int, float, ], + 'enum_query_string_array': typing.Union[parameter_2.schema, list, tuple, ], + 'enum_query_string': typing.Union[parameter_3.schema, str, ], + 'enum_query_integer': typing.Union[parameter_4.schema, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[parameter_5.schema, decimal.Decimal, int, float, ], }, total=False ) @@ -77,8 +75,8 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_header_string_array': typing.Union[parameter_0.enum_header_string_array, list, tuple, ], - 'enum_header_string': typing.Union[parameter_1.enum_header_string, str, ], + 'enum_header_string_array': typing.Union[parameter_0.schema, list, tuple, ], + 'enum_header_string': typing.Union[parameter_1.schema, str, ], }, total=False ) @@ -102,8 +100,6 @@ 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[request_body.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, @@ -113,27 +109,10 @@ def _enum_parameters_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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, @@ -143,8 +122,6 @@ def _enum_parameters_oapg( @typing.overload def _enum_parameters_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -157,8 +134,6 @@ def _enum_parameters_oapg( def _enum_parameters_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -195,21 +170,10 @@ class instances _headers.extend(serialized_data) # TODO add cookie handling - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _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, ) @@ -235,8 +199,6 @@ class EnumParameters(BaseApi): @typing.overload def enum_parameters( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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, @@ -246,27 +208,10 @@ def enum_parameters( response_for_200.ApiResponse, ]: ... - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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, @@ -276,8 +221,6 @@ def enum_parameters( @typing.overload def enum_parameters( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -290,8 +233,6 @@ def enum_parameters( def enum_parameters( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -299,10 +240,8 @@ def enum_parameters( 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 @@ -315,8 +254,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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, @@ -326,27 +263,10 @@ def get( response_for_200.ApiResponse, ]: ... - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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, @@ -356,8 +276,6 @@ def get( @typing.overload def get( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -370,8 +288,6 @@ def get( def get( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -379,10 +295,8 @@ def get( 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 index a24371dfefa..d49805026e8 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 @@ -27,14 +27,12 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 -from . import request_body from . import parameter_0 from . import parameter_1 from . import parameter_2 from . import parameter_3 from . import parameter_4 from . import parameter_5 -from . import body @@ -47,10 +45,10 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_query_string_array': typing.Union[parameter_2.enum_query_string_array, list, tuple, ], - 'enum_query_string': typing.Union[parameter_3.enum_query_string, str, ], - 'enum_query_integer': typing.Union[parameter_4.enum_query_integer, decimal.Decimal, int, ], - 'enum_query_double': typing.Union[parameter_5.enum_query_double, decimal.Decimal, int, float, ], + 'enum_query_string_array': typing.Union[parameter_2.schema, list, tuple, ], + 'enum_query_string': typing.Union[parameter_3.schema, str, ], + 'enum_query_integer': typing.Union[parameter_4.schema, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[parameter_5.schema, decimal.Decimal, int, float, ], }, total=False ) @@ -76,8 +74,8 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'enum_header_string_array': typing.Union[parameter_0.enum_header_string_array, list, tuple, ], - 'enum_header_string': typing.Union[parameter_1.enum_header_string, str, ], + 'enum_header_string_array': typing.Union[parameter_0.schema, list, tuple, ], + 'enum_header_string': typing.Union[parameter_1.schema, str, ], }, total=False ) @@ -96,8 +94,6 @@ 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[request_body.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, @@ -107,27 +103,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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, @@ -137,8 +116,6 @@ class BaseApi(api_client.Api): @typing.overload def _enum_parameters_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -151,8 +128,6 @@ class BaseApi(api_client.Api): def _enum_parameters_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -189,21 +164,10 @@ class BaseApi(api_client.Api): _headers.extend(serialized_data) # TODO add cookie handling - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _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, ) @@ -229,8 +193,6 @@ class EnumParameters(BaseApi): @typing.overload def enum_parameters( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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, @@ -240,27 +202,10 @@ class EnumParameters(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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, @@ -270,8 +215,6 @@ class EnumParameters(BaseApi): @typing.overload def enum_parameters( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -284,8 +227,6 @@ class EnumParameters(BaseApi): def enum_parameters( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -293,10 +234,8 @@ class EnumParameters(BaseApi): 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 @@ -309,8 +248,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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, @@ -320,27 +257,10 @@ class ApiForget(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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, @@ -350,8 +270,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -364,8 +282,6 @@ class ApiForget(BaseApi): def get( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -373,10 +289,8 @@ class ApiForget(BaseApi): 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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py index 0ca823d6f53..51ba873e332 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py @@ -27,7 +27,7 @@ -class enum_header_string_array( +class schema( schemas.ListSchema ): @@ -59,7 +59,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, - ) -> 'enum_header_string_array': + ) -> 'schema': return super().__new__( cls, arg, @@ -73,5 +73,5 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.HeaderParameter( name="enum_header_string_array", style=api_client.ParameterStyle.SIMPLE, - schema=enum_header_string_array, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py index 58b280b103e..889b882e424 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py @@ -27,7 +27,7 @@ -class enum_header_string( +class schema( schemas.EnumBase, schemas.StrSchema ): @@ -56,5 +56,5 @@ def XYZ(cls): parameter_oapg = api_client.HeaderParameter( name="enum_header_string", style=api_client.ParameterStyle.SIMPLE, - schema=enum_header_string, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py index ff1965beca0..9b7f38bc9cb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py @@ -27,7 +27,7 @@ -class enum_query_string_array( +class schema( schemas.ListSchema ): @@ -59,7 +59,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, - ) -> 'enum_query_string_array': + ) -> 'schema': return super().__new__( cls, arg, @@ -73,6 +73,6 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="enum_query_string_array", style=api_client.ParameterStyle.FORM, - schema=enum_query_string_array, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py index 4eb3d9c7190..f740b97872c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py @@ -27,7 +27,7 @@ -class enum_query_string( +class schema( schemas.EnumBase, schemas.StrSchema ): @@ -56,6 +56,6 @@ def XYZ(cls): parameter_oapg = api_client.QueryParameter( name="enum_query_string", style=api_client.ParameterStyle.FORM, - schema=enum_query_string, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py index e4d2f75b948..ad2a99a2e1e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py @@ -27,7 +27,7 @@ -class enum_query_integer( +class schema( schemas.EnumBase, schemas.Int32Schema ): @@ -52,6 +52,6 @@ def NEGATIVE_2(cls): parameter_oapg = api_client.QueryParameter( name="enum_query_integer", style=api_client.ParameterStyle.FORM, - schema=enum_query_integer, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py index f3a753f2f05..31c3da09cea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py @@ -27,7 +27,7 @@ -class enum_query_double( +class schema( schemas.EnumBase, schemas.Float64Schema ): @@ -52,6 +52,6 @@ def NEGATIVE_1_PT_2(cls): parameter_oapg = api_client.QueryParameter( name="enum_query_double", style=api_client.ParameterStyle.FORM, - schema=enum_query_double, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py index f674b44c3b6..ccbf1ed435f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import client _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi index b0e54f82d94..7d0b9305f40 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.client import Client from . import response_for_200 from . import request_body -from . import client _all_accept_content_types = ( 'application/json', 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 index fc02f498242..77b66652538 100644 --- 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 @@ -9,7 +9,6 @@ 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 @@ -28,8 +27,6 @@ from .. import path from . import response_for_200 from . import response_for_404 -from . import request_body -from . import body _auth = [ @@ -46,8 +43,6 @@ 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[request_body.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] = ..., @@ -55,25 +50,10 @@ def _endpoint_parameters_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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: ... @@ -81,8 +61,6 @@ def _endpoint_parameters_oapg( @typing.overload def _endpoint_parameters_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -93,8 +71,6 @@ def _endpoint_parameters_oapg( def _endpoint_parameters_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -106,25 +82,11 @@ def _endpoint_parameters_oapg( 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -151,20 +113,6 @@ class EndpointParameters(BaseApi): @typing.overload def endpoint_parameters( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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[request_body.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] = ..., @@ -172,13 +120,10 @@ def endpoint_parameters( response_for_200.ApiResponse, ]: ... - @typing.overload def endpoint_parameters( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -186,8 +131,6 @@ def endpoint_parameters( @typing.overload def endpoint_parameters( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -198,15 +141,11 @@ def endpoint_parameters( def endpoint_parameters( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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 @@ -219,8 +158,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., @@ -228,25 +165,10 @@ def post( response_for_200.ApiResponse, ]: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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: ... @@ -254,8 +176,6 @@ def post( @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -266,15 +186,11 @@ def post( def post( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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 index f5430cb833e..855fcbe2349 100644 --- 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 @@ -9,7 +9,6 @@ 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 @@ -27,8 +26,6 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 -from . import request_body -from . import body @@ -36,8 +33,6 @@ 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[request_body.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] = ..., @@ -45,25 +40,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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: ... @@ -71,8 +51,6 @@ class BaseApi(api_client.Api): @typing.overload def _endpoint_parameters_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -83,8 +61,6 @@ class BaseApi(api_client.Api): def _endpoint_parameters_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -96,25 +72,11 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -141,20 +103,6 @@ class EndpointParameters(BaseApi): @typing.overload def endpoint_parameters( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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[request_body.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] = ..., @@ -162,13 +110,10 @@ class EndpointParameters(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload def endpoint_parameters( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -176,8 +121,6 @@ class EndpointParameters(BaseApi): @typing.overload def endpoint_parameters( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -188,15 +131,11 @@ class EndpointParameters(BaseApi): def endpoint_parameters( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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 @@ -209,8 +148,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., @@ -218,25 +155,10 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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[request_body.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: ... @@ -244,8 +166,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -256,15 +176,11 @@ class ApiForpost(BaseApi): def post( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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_additional_properties_with_array_of_enums/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py index 1055b00366e..ae4cbd77aa9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import additional_properties_with_array_of_enums _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi index aed7821b430..e42e3053bb9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.additional_properties_with_array_of_enums import Additio from . import response_for_200 from . import request_body -from . import additional_properties_with_array_of_enums _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py index ed5c3f337f8..5f471517ac7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import file_schema_test_class _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi index 06742bafc44..4efc088b123 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.file_schema_test_class import FileSchemaTestClass from . import response_for_200 from . import request_body -from . import file_schema_test_class 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 d3abb9e411b..15d2eb2f8d3 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 @@ -31,7 +31,6 @@ from . import response_for_200 from . import request_body from . import parameter_0 -from . import user @@ -39,7 +38,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[parameter_0.query, str, ], + 'query': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 92049279fce..37c8f2eba6a 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 @@ -30,7 +30,6 @@ from petstore_api.model.user import User from . import response_for_200 from . import request_body from . import parameter_0 -from . import user @@ -38,7 +37,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[parameter_0.query, str, ], + 'query': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py index d6b0786b9d4..227026e4e0c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py @@ -27,13 +27,13 @@ from petstore_api.model.user import User -query = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="query", style=api_client.ParameterStyle.FORM, - schema=query, + schema=items, 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 88c3edf659f..6447c93549f 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 @@ -36,9 +36,9 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[parameter_0.someVar, str, ], - 'SomeVar': typing.Union[parameter_1.SomeVar, str, ], - 'some_var': typing.Union[parameter_2.some_var, str, ], + 'someVar': typing.Union[parameter_0.items, str, ], + 'SomeVar': typing.Union[parameter_1.items, str, ], + 'some_var': typing.Union[parameter_2.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 6bac30676fb..6b682ae6208 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 @@ -35,9 +35,9 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[parameter_0.someVar, str, ], - 'SomeVar': typing.Union[parameter_1.SomeVar, str, ], - 'some_var': typing.Union[parameter_2.some_var, str, ], + 'someVar': typing.Union[parameter_0.items, str, ], + 'SomeVar': typing.Union[parameter_1.items, str, ], + 'some_var': typing.Union[parameter_2.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py index 04bff5b10a0..73d572108b7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -someVar = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="someVar", style=api_client.ParameterStyle.FORM, - schema=someVar, + schema=items, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py index 5d55e1f6f35..b107ed43732 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -SomeVar = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="SomeVar", style=api_client.ParameterStyle.FORM, - schema=SomeVar, + schema=items, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py index 7d777cce370..261d5a5255e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -some_var = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="some_var", style=api_client.ParameterStyle.FORM, - schema=some_var, + schema=items, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py index 6936f02b688..a3bb4cd7f4b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import client _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi index 1b5086f0bf9..a38e2de8811 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.client import Client from . import response_for_200 from . import request_body -from . import client _all_accept_content_types = ( 'application/json', 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 d720b86ba11..4f4cffd9cd7 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 @@ -35,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[parameter_0.id, str, ], + 'id': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 99ff8be2ae4..68e60f31699 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 @@ -34,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[parameter_0.id, str, ], + 'id': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py index 8df81412afd..bc694b5fd53 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -id = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="id", style=api_client.ParameterStyle.SIMPLE, - schema=id, + schema=items, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py index c74c1da49ef..d2bdb197a74 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.py @@ -28,7 +28,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import request_body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi index 3002b70b491..7e1f3d7ac1c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/__init__.pyi @@ -27,7 +27,6 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body -from . import request_body 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 03715638739..c670e7c4338 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 @@ -30,7 +30,6 @@ from . import request_body from . import parameter_0 from . import parameter_1 -from . import any_type @@ -43,8 +42,8 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'compositionAtRoot': typing.Union[parameter_0.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[parameter_1.compositionInProperty, dict, frozendict.frozendict, ], + 'compositionAtRoot': typing.Union[parameter_0.schema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + 'compositionInProperty': typing.Union[parameter_1.schema, dict, frozendict.frozendict, ], }, total=False ) 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 6053e34a572..6e5a76d5d50 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 @@ -29,7 +29,6 @@ from . import response_for_200 from . import request_body from . import parameter_0 from . import parameter_1 -from . import any_type @@ -42,8 +41,8 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'compositionAtRoot': typing.Union[parameter_0.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[parameter_1.compositionInProperty, dict, frozendict.frozendict, ], + 'compositionAtRoot': typing.Union[parameter_0.schema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + 'compositionInProperty': typing.Union[parameter_1.schema, dict, frozendict.frozendict, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py index 40c161a1056..2336d255e86 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py @@ -27,7 +27,7 @@ -class compositionAtRoot( +class schema( schemas.ComposedSchema, ): @@ -63,7 +63,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], - ) -> 'compositionAtRoot': + ) -> 'schema': return super().__new__( cls, *args, @@ -75,6 +75,6 @@ def __new__( parameter_oapg = api_client.QueryParameter( name="compositionAtRoot", style=api_client.ParameterStyle.FORM, - schema=compositionAtRoot, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py index a0cbe8dfb6e..2d50755b405 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py @@ -27,7 +27,7 @@ -class compositionInProperty( +class schema( schemas.DictSchema ): @@ -111,7 +111,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], - ) -> 'compositionInProperty': + ) -> 'schema': return super().__new__( cls, *args, @@ -124,6 +124,6 @@ def __new__( parameter_oapg = api_client.QueryParameter( name="compositionInProperty", style=api_client.ParameterStyle.FORM, - schema=compositionInProperty, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py index 270a02a787f..3a672dde2b9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py @@ -9,7 +9,6 @@ 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 @@ -27,8 +26,6 @@ from .. import path from . import response_for_200 -from . import request_body -from . import body _status_code_to_response = { @@ -40,8 +37,6 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data_oapg( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., @@ -49,25 +44,10 @@ def _json_form_data_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _json_form_data_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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 _json_form_data_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -75,8 +55,6 @@ def _json_form_data_oapg( @typing.overload def _json_form_data_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -87,8 +65,6 @@ def _json_form_data_oapg( def _json_form_data_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -100,25 +76,11 @@ def _json_form_data_oapg( 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _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, ) @@ -144,20 +106,6 @@ class JsonFormData(BaseApi): @typing.overload def json_form_data( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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 json_form_data( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., @@ -165,13 +113,10 @@ def json_form_data( response_for_200.ApiResponse, ]: ... - @typing.overload def json_form_data( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -179,8 +124,6 @@ def json_form_data( @typing.overload def json_form_data( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -191,15 +134,11 @@ def json_form_data( def json_form_data( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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._json_form_data_oapg( - body=body, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -212,8 +151,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., @@ -221,25 +158,10 @@ def get( response_for_200.ApiResponse, ]: ... - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[request_body.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 get( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -247,8 +169,6 @@ def get( @typing.overload def get( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -259,15 +179,11 @@ def get( def get( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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._json_form_data_oapg( - body=body, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi index c58a8cc9bc3..107b6fbf6e0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi @@ -9,7 +9,6 @@ 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 @@ -26,8 +25,6 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 -from . import request_body -from . import body @@ -35,8 +32,6 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data_oapg( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., @@ -44,25 +39,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _json_form_data_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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 _json_form_data_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -70,8 +50,6 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -82,8 +60,6 @@ class BaseApi(api_client.Api): def _json_form_data_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -95,25 +71,11 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _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, ) @@ -139,20 +101,6 @@ class JsonFormData(BaseApi): @typing.overload def json_form_data( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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 json_form_data( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., @@ -160,13 +108,10 @@ class JsonFormData(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload def json_form_data( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -174,8 +119,6 @@ class JsonFormData(BaseApi): @typing.overload def json_form_data( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -186,15 +129,11 @@ class JsonFormData(BaseApi): def json_form_data( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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._json_form_data_oapg( - body=body, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -207,8 +146,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., @@ -216,25 +153,10 @@ class ApiForget(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[request_body.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 get( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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: ... @@ -242,8 +164,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - content_type: str = ..., - body: typing.Union[request_body.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 = ..., @@ -254,15 +174,11 @@ class ApiForget(BaseApi): def get( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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._json_form_data_oapg( - body=body, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py index b789408ca17..c0dbecc4f4f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import json_patch_request _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi index 24c62be3b87..9c6f437c039 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.json_patch_request import JSONPatchRequest from . import response_for_200 from . import request_body -from . import json_patch_request diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py index 976b5898e5b..6451c71cc23 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.py @@ -28,7 +28,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi index 752a6936c2e..493a6f779a4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/__init__.pyi @@ -27,7 +27,6 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json; charset=utf-8', 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 e15436cd40c..7505d41b59c 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 @@ -39,7 +39,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[parameter_0.mapBean, dict, frozendict.frozendict, ], + 'mapBean': typing.Union[parameter_0.schema, dict, frozendict.frozendict, ], }, total=False ) 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 189dc1fec05..fff2fb3f58a 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 @@ -38,7 +38,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[parameter_0.mapBean, dict, frozendict.frozendict, ], + 'mapBean': typing.Union[parameter_0.schema, dict, frozendict.frozendict, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py index 85df3f5fb7e..df7c6fd1f6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py @@ -27,7 +27,7 @@ -class mapBean( +class schema( schemas.DictSchema ): @@ -67,7 +67,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], - ) -> 'mapBean': + ) -> 'schema': return super().__new__( cls, *args, @@ -80,6 +80,6 @@ def __new__( parameter_oapg = api_client.QueryParameter( name="mapBean", style=api_client.ParameterStyle.DEEP_OBJECT, - schema=mapBean, + schema=schema, 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 d0cf8a22401..bdc884f1973 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 @@ -47,7 +47,6 @@ from . import parameter_16 from . import parameter_17 from . import parameter_18 -from . import body @@ -60,11 +59,11 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_0._1, str, ], - 'aB': typing.Union[parameter_1.aB, str, ], - 'Ab': typing.Union[parameter_2.Ab, str, ], - 'self': typing.Union[parameter_3._self, str, ], - 'A-B': typing.Union[parameter_4.a_b, str, ], + '1': typing.Union[parameter_0.items, str, ], + 'aB': typing.Union[parameter_1.items, str, ], + 'Ab': typing.Union[parameter_2.items, str, ], + 'self': typing.Union[parameter_3.items, str, ], + 'A-B': typing.Union[parameter_4.items, str, ], }, total=False ) @@ -91,10 +90,10 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_5._1, str, ], - 'aB': typing.Union[parameter_6.aB, str, ], - 'self': typing.Union[parameter_7._self, str, ], - 'A-B': typing.Union[parameter_8.a_b, str, ], + '1': typing.Union[parameter_5.items, str, ], + 'aB': typing.Union[parameter_6.items, str, ], + 'self': typing.Union[parameter_7.items, str, ], + 'A-B': typing.Union[parameter_8.items, str, ], }, total=False ) @@ -115,11 +114,11 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '1': typing.Union[parameter_9._1, str, ], - 'aB': typing.Union[parameter_10.aB, str, ], - 'Ab': typing.Union[parameter_11.Ab, str, ], - 'self': typing.Union[parameter_12._self, str, ], - 'A-B': typing.Union[parameter_13.a_b, str, ], + '1': typing.Union[parameter_9.items, str, ], + 'aB': typing.Union[parameter_10.items, str, ], + 'Ab': typing.Union[parameter_11.items, str, ], + 'self': typing.Union[parameter_12.items, str, ], + 'A-B': typing.Union[parameter_13.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -151,11 +150,11 @@ class RequestCookieParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_14._1, str, ], - 'aB': typing.Union[parameter_15.aB, str, ], - 'Ab': typing.Union[parameter_16.Ab, str, ], - 'self': typing.Union[parameter_17._self, str, ], - 'A-B': typing.Union[parameter_18.a_b, str, ], + '1': typing.Union[parameter_14.items, str, ], + 'aB': typing.Union[parameter_15.items, str, ], + 'Ab': typing.Union[parameter_16.items, str, ], + 'self': typing.Union[parameter_17.items, str, ], + 'A-B': typing.Union[parameter_18.items, str, ], }, total=False ) 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 00711b8a97f..d0a7207ae60 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 @@ -46,7 +46,6 @@ from . import parameter_15 from . import parameter_16 from . import parameter_17 from . import parameter_18 -from . import body @@ -59,11 +58,11 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_0._1, str, ], - 'aB': typing.Union[parameter_1.aB, str, ], - 'Ab': typing.Union[parameter_2.Ab, str, ], - 'self': typing.Union[parameter_3._self, str, ], - 'A-B': typing.Union[parameter_4.a_b, str, ], + '1': typing.Union[parameter_0.items, str, ], + 'aB': typing.Union[parameter_1.items, str, ], + 'Ab': typing.Union[parameter_2.items, str, ], + 'self': typing.Union[parameter_3.items, str, ], + 'A-B': typing.Union[parameter_4.items, str, ], }, total=False ) @@ -90,10 +89,10 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_5._1, str, ], - 'aB': typing.Union[parameter_6.aB, str, ], - 'self': typing.Union[parameter_7._self, str, ], - 'A-B': typing.Union[parameter_8.a_b, str, ], + '1': typing.Union[parameter_5.items, str, ], + 'aB': typing.Union[parameter_6.items, str, ], + 'self': typing.Union[parameter_7.items, str, ], + 'A-B': typing.Union[parameter_8.items, str, ], }, total=False ) @@ -114,11 +113,11 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '1': typing.Union[parameter_9._1, str, ], - 'aB': typing.Union[parameter_10.aB, str, ], - 'Ab': typing.Union[parameter_11.Ab, str, ], - 'self': typing.Union[parameter_12._self, str, ], - 'A-B': typing.Union[parameter_13.a_b, str, ], + '1': typing.Union[parameter_9.items, str, ], + 'aB': typing.Union[parameter_10.items, str, ], + 'Ab': typing.Union[parameter_11.items, str, ], + 'self': typing.Union[parameter_12.items, str, ], + 'A-B': typing.Union[parameter_13.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -150,11 +149,11 @@ class RequestCookieParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_14._1, str, ], - 'aB': typing.Union[parameter_15.aB, str, ], - 'Ab': typing.Union[parameter_16.Ab, str, ], - 'self': typing.Union[parameter_17._self, str, ], - 'A-B': typing.Union[parameter_18.a_b, str, ], + '1': typing.Union[parameter_14.items, str, ], + 'aB': typing.Union[parameter_15.items, str, ], + 'Ab': typing.Union[parameter_16.items, str, ], + 'self': typing.Union[parameter_17.items, str, ], + 'A-B': typing.Union[parameter_18.items, str, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py index 3d14e4d5dce..e62a56458b7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -_1 = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=_1, + schema=items, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py index fda69b131e4..5ed117feaf1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -aB = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=aB, + schema=items, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py index 0f35ddcfab7..32f4f6fefc4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -_1 = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=_1, + schema=items, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py index 24c14ceed0a..411b4618ccd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -aB = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=aB, + schema=items, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py index e0c22e3e237..245a7a36bd5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -_self = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=_self, + schema=items, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py index 22c850a1036..5f7d7d4ca2e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -a_b = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=a_b, + schema=items, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py index 98ec9a42dda..31c505e69c0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -_1 = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=_1, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py index 5c2bf895542..e02e642a736 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -aB = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=aB, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py index 94199176481..598e54d05e0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -Ab = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=Ab, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py index 7da407e13ed..cb0699e6a3a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -_self = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=_self, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py index 42b0c4d69b7..496df571f2a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -a_b = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=a_b, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py index 9f23f416d3a..9c6e91ffbc2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -Ab = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="Ab", style=api_client.ParameterStyle.SIMPLE, - schema=Ab, + schema=items, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py index 59d12d21bf3..f1897ce63d4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -_self = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=_self, + schema=items, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py index dad40d1271e..0618681d22c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -a_b = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=a_b, + schema=items, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py index 6d65e57e30a..04ce58c3da7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -_1 = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=_1, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py index b277f9b2e43..3264878ddf6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -aB = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=aB, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py index 703e00b2eb8..d5c7ba5b0c0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -Ab = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=Ab, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py index c73d6a3ad69..fa36146b6a1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -_self = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=_self, + schema=items, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py index 06e5e8d4d12..1d7184dc61d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -a_b = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=a_b, + schema=items, 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 2b549ff5f0d..515c1c99ff1 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 @@ -27,9 +27,7 @@ from .. import path from . import response_for_200 -from . import request_body from . import parameter_0 -from . import body @@ -37,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -71,8 +69,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -82,27 +78,10 @@ def _upload_file_with_required_file_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_file_with_required_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -112,8 +91,6 @@ def _upload_file_with_required_file_oapg( @typing.overload def _upload_file_with_required_file_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -126,8 +103,6 @@ def _upload_file_with_required_file_oapg( def _upload_file_with_required_file_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -160,21 +135,10 @@ class instances 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -201,8 +165,6 @@ class UploadFileWithRequiredFile(BaseApi): @typing.overload def upload_file_with_required_file( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -212,27 +174,10 @@ def upload_file_with_required_file( response_for_200.ApiResponse, ]: ... - @typing.overload - def upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def upload_file_with_required_file( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -242,8 +187,6 @@ def upload_file_with_required_file( @typing.overload def upload_file_with_required_file( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -256,8 +199,6 @@ def upload_file_with_required_file( def upload_file_with_required_file( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -265,9 +206,7 @@ def upload_file_with_required_file( skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -281,8 +220,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -292,27 +229,10 @@ def post( response_for_200.ApiResponse, ]: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -322,8 +242,6 @@ def post( @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -336,8 +254,6 @@ def post( def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -345,9 +261,7 @@ def post( skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, 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 336b181cc0b..0a9b0570d33 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 @@ -26,9 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 -from . import request_body from . import parameter_0 -from . import body @@ -36,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -62,8 +60,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -73,27 +69,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_file_with_required_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -103,8 +82,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -117,8 +94,6 @@ class BaseApi(api_client.Api): def _upload_file_with_required_file_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -151,21 +126,10 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -192,8 +156,6 @@ class UploadFileWithRequiredFile(BaseApi): @typing.overload def upload_file_with_required_file( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -203,27 +165,10 @@ class UploadFileWithRequiredFile(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def upload_file_with_required_file( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -233,8 +178,6 @@ class UploadFileWithRequiredFile(BaseApi): @typing.overload def upload_file_with_required_file( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -247,8 +190,6 @@ class UploadFileWithRequiredFile(BaseApi): def upload_file_with_required_file( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -256,9 +197,7 @@ class UploadFileWithRequiredFile(BaseApi): skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -272,8 +211,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -283,27 +220,10 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -313,8 +233,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -327,8 +245,6 @@ class ApiForpost(BaseApi): def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -336,9 +252,7 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py index d03e0e890af..236cf812790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -petId = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=petId, + schema=schema, 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 0eeeb0ba9c9..3e52478a03f 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 @@ -41,7 +41,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[parameter_0.mapBean, ], + 'mapBean': typing.Union[parameter_0.schema, ], }, total=False ) 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 cc7651ae7d5..cc02bfa1211 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 @@ -40,7 +40,7 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'mapBean': typing.Union[parameter_0.mapBean, ], + 'mapBean': typing.Union[parameter_0.schema, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py index 594500eecc9..9be1c863107 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py @@ -27,12 +27,12 @@ from petstore_api.model.foo import Foo -mapBean = Foo +schema = Foo parameter_oapg = api_client.QueryParameter( name="mapBean", style=api_client.ParameterStyle.DEEP_OBJECT, - schema=mapBean, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py index cef21460f7f..6b15a372dc5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import array_of_enums _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi index 0d4c211ca7a..90929867073 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.array_of_enums import ArrayOfEnums from . import response_for_200 from . import request_body -from . import array_of_enums _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py index 071032abc6f..97ac4f5d5e2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi index 57c2a5195f7..708c0befb3e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.animal_farm import AnimalFarm from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py index b8ea5e5cd9d..d54d0e6fcc8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi index 0144e837c29..22dd64fad12 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.boolean import Boolean from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py index 320dfea39ca..1767bf02a25 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import composed_one_of_different_types _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi index 023d23ec147..02a2ad57c1e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDiff from . import response_for_200 from . import request_body -from . import composed_one_of_different_types _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py index 5f1a5c77719..873c79d8ba7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi index c44c26c7687..cd7dbfa8f85 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.string_enum import StringEnum from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py index 90f0d6bc543..f860aa7df3c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import mammal _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi index 989e52e970e..1c2957e4ae1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.mammal import Mammal from . import response_for_200 from . import request_body -from . import mammal _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py index 8d3bf2feea5..2261b7c202f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi index f91abe041d5..6635642d469 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.number_with_validations import NumberWithValidations from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py index 9fbff20b920..c929d62a644 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi index 91d70636ccf..2321ea98623 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefPro from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py index 240d92aeefb..d8ce8819827 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi index db0caa315b4..c6a96d5d45d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.string import String from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/json', 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 61eaf544c3d..c8740fec5c7 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 @@ -41,12 +41,12 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'pipe': typing.Union[parameter_0.pipe, list, tuple, ], - 'ioutil': typing.Union[parameter_1.ioutil, list, tuple, ], - 'http': typing.Union[parameter_2.http, list, tuple, ], - 'url': typing.Union[parameter_3.url, list, tuple, ], - 'context': typing.Union[parameter_4.context, list, tuple, ], - 'refParam': typing.Union[parameter_5.refParam, ], + 'pipe': typing.Union[parameter_0.schema, list, tuple, ], + 'ioutil': typing.Union[parameter_1.schema, list, tuple, ], + 'http': typing.Union[parameter_2.schema, list, tuple, ], + 'url': typing.Union[parameter_3.schema, list, tuple, ], + 'context': typing.Union[parameter_4.schema, list, tuple, ], + 'refParam': typing.Union[parameter_5.schema, ], } ) OptionalParams = typing_extensions.TypedDict( 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 554243ea8b0..8366b07f4fd 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 @@ -40,12 +40,12 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'pipe': typing.Union[parameter_0.pipe, list, tuple, ], - 'ioutil': typing.Union[parameter_1.ioutil, list, tuple, ], - 'http': typing.Union[parameter_2.http, list, tuple, ], - 'url': typing.Union[parameter_3.url, list, tuple, ], - 'context': typing.Union[parameter_4.context, list, tuple, ], - 'refParam': typing.Union[parameter_5.refParam, ], + 'pipe': typing.Union[parameter_0.schema, list, tuple, ], + 'ioutil': typing.Union[parameter_1.schema, list, tuple, ], + 'http': typing.Union[parameter_2.schema, list, tuple, ], + 'url': typing.Union[parameter_3.schema, list, tuple, ], + 'context': typing.Union[parameter_4.schema, list, tuple, ], + 'refParam': typing.Union[parameter_5.schema, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py index dbc057d50dc..b0a6040125f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py @@ -29,7 +29,7 @@ -class pipe( +class schema( schemas.ListSchema ): @@ -41,7 +41,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, - ) -> 'pipe': + ) -> 'schema': return super().__new__( cls, arg, @@ -55,7 +55,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="pipe", style=api_client.ParameterStyle.FORM, - schema=pipe, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py index b5aeabd06c3..ee1140e3471 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py @@ -29,7 +29,7 @@ -class ioutil( +class schema( schemas.ListSchema ): @@ -41,7 +41,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, - ) -> 'ioutil': + ) -> 'schema': return super().__new__( cls, arg, @@ -55,6 +55,6 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="ioutil", style=api_client.ParameterStyle.FORM, - schema=ioutil, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py index f42fea174a3..91d63f1d6a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py @@ -29,7 +29,7 @@ -class http( +class schema( schemas.ListSchema ): @@ -41,7 +41,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, - ) -> 'http': + ) -> 'schema': return super().__new__( cls, arg, @@ -55,6 +55,6 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="http", style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=http, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py index edde0d4879b..afdcefb4fc2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py @@ -29,7 +29,7 @@ -class url( +class schema( schemas.ListSchema ): @@ -41,7 +41,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, - ) -> 'url': + ) -> 'schema': return super().__new__( cls, arg, @@ -55,6 +55,6 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="url", style=api_client.ParameterStyle.FORM, - schema=url, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py index fb1be722e2a..8ad12fb46fe 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py @@ -29,7 +29,7 @@ -class context( +class schema( schemas.ListSchema ): @@ -41,7 +41,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, - ) -> 'context': + ) -> 'schema': return super().__new__( cls, arg, @@ -55,7 +55,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="context", style=api_client.ParameterStyle.FORM, - schema=context, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py index ef17cf0c6ea..19a38317a45 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py @@ -27,13 +27,13 @@ from petstore_api.model.string_with_validation import StringWithValidation -refParam = StringWithValidation +schema = StringWithValidation parameter_oapg = api_client.QueryParameter( name="refParam", style=api_client.ParameterStyle.FORM, - schema=refParam, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py index 2239784f5d4..50216505726 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.py @@ -28,7 +28,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import body _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi index fba7f8c90f4..821c15c7775 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/__init__.pyi @@ -27,7 +27,6 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body -from . import body _all_accept_content_types = ( 'application/octet-stream', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py index a4b39a330bb..c8fe614c053 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py @@ -27,8 +27,6 @@ from .. import path from . import response_for_200 -from . import request_body -from . import body _status_code_to_response = { @@ -43,8 +41,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -53,26 +49,10 @@ def _upload_file_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_file_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -81,8 +61,6 @@ def _upload_file_oapg( @typing.overload def _upload_file_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -94,8 +72,6 @@ def _upload_file_oapg( def _upload_file_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -115,21 +91,10 @@ class instances 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, - fields=_fields, - body=_body, stream=stream, timeout=timeout, ) @@ -155,21 +120,6 @@ class UploadFile(BaseApi): @typing.overload def upload_file( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def upload_file( - self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -178,13 +128,10 @@ def upload_file( response_for_200.ApiResponse, ]: ... - @typing.overload def upload_file( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -193,8 +140,6 @@ def upload_file( @typing.overload def upload_file( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -206,16 +151,12 @@ def upload_file( def upload_file( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -229,21 +170,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -252,13 +178,10 @@ def post( response_for_200.ApiResponse, ]: ... - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -267,8 +190,6 @@ def post( @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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,16 +201,12 @@ def post( def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi index 1e9efda5ac5..821d351eb6d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi @@ -26,8 +26,6 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 -from . import request_body -from . import body _all_accept_content_types = ( 'application/json', @@ -38,8 +36,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -48,26 +44,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_file_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -76,8 +56,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -89,8 +67,6 @@ class BaseApi(api_client.Api): def _upload_file_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -110,21 +86,10 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, - fields=_fields, - body=_body, stream=stream, timeout=timeout, ) @@ -150,21 +115,6 @@ class UploadFile(BaseApi): @typing.overload def upload_file( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def upload_file( - self, - content_type: str = ..., - body: typing.Union[request_body.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,13 +123,10 @@ class UploadFile(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload def upload_file( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -188,8 +135,6 @@ class UploadFile(BaseApi): @typing.overload def upload_file( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -201,16 +146,12 @@ class UploadFile(BaseApi): def upload_file( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -224,21 +165,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -247,13 +173,10 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -262,8 +185,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -275,16 +196,12 @@ class ApiForpost(BaseApi): def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py index 3a55946a996..fd71d82c1d3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py @@ -27,8 +27,6 @@ from .. import path from . import response_for_200 -from . import request_body -from . import body _status_code_to_response = { @@ -43,8 +41,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -53,26 +49,10 @@ def _upload_files_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_files_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_files_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -81,8 +61,6 @@ def _upload_files_oapg( @typing.overload def _upload_files_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -94,8 +72,6 @@ def _upload_files_oapg( def _upload_files_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -115,21 +91,10 @@ class instances 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, - fields=_fields, - body=_body, stream=stream, timeout=timeout, ) @@ -155,21 +120,6 @@ class UploadFiles(BaseApi): @typing.overload def upload_files( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def upload_files( - self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -178,13 +128,10 @@ def upload_files( response_for_200.ApiResponse, ]: ... - @typing.overload def upload_files( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -193,8 +140,6 @@ def upload_files( @typing.overload def upload_files( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -206,16 +151,12 @@ def upload_files( def upload_files( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -229,21 +170,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -252,13 +178,10 @@ def post( response_for_200.ApiResponse, ]: ... - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -267,8 +190,6 @@ def post( @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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,16 +201,12 @@ def post( def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi index c517b5a8070..a8f34908c38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi @@ -26,8 +26,6 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 -from . import request_body -from . import body _all_accept_content_types = ( 'application/json', @@ -38,8 +36,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -48,26 +44,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_files_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_files_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -76,8 +56,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -89,8 +67,6 @@ class BaseApi(api_client.Api): def _upload_files_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -110,21 +86,10 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, - fields=_fields, - body=_body, stream=stream, timeout=timeout, ) @@ -150,21 +115,6 @@ class UploadFiles(BaseApi): @typing.overload def upload_files( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def upload_files( - self, - content_type: str = ..., - body: typing.Union[request_body.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,13 +123,10 @@ class UploadFiles(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload def upload_files( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -188,8 +135,6 @@ class UploadFiles(BaseApi): @typing.overload def upload_files( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -201,16 +146,12 @@ class UploadFiles(BaseApi): def upload_files( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -224,21 +165,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -247,13 +173,10 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -262,8 +185,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -275,16 +196,12 @@ class ApiForpost(BaseApi): def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( - body=body, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py index 5cf303633a8..d6cf0a3d254 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.py @@ -31,7 +31,6 @@ from . import response_for_200 from . import response_for_405 from . import request_body -from . import pet _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi index 949d6c5b2ac..b740b83f419 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/__init__.pyi @@ -30,7 +30,6 @@ from petstore_api.model.pet import Pet from . import response_for_200 from . import response_for_405 from . import request_body -from . import pet diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py index 97a4ab475b6..480f66ac869 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.py @@ -32,7 +32,6 @@ from . import response_for_404 from . import response_for_405 from . import request_body -from . import pet _auth = [ diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi index 5c1ebd9c6cc..b1c8a7c7065 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/__init__.pyi @@ -31,7 +31,6 @@ from . import response_for_400 from . import response_for_404 from . import response_for_405 from . import request_body -from . import pet 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 5bdc29e3edb..da50bae9d53 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 @@ -36,7 +36,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'status': typing.Union[parameter_0.status, list, tuple, ], + 'status': typing.Union[parameter_0.schema, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( 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 b9e9aedf9d6..b51a0e81680 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 @@ -35,7 +35,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'status': typing.Union[parameter_0.status, list, tuple, ], + 'status': typing.Union[parameter_0.schema, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py index 5adcac303f5..c7c25288ae8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py @@ -27,7 +27,7 @@ -class status( +class schema( schemas.ListSchema ): @@ -64,7 +64,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, - ) -> 'status': + ) -> 'schema': return super().__new__( cls, arg, @@ -78,6 +78,6 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="status", style=api_client.ParameterStyle.FORM, - schema=status, + schema=schema, required=True, ), 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 a1de1d0567a..ae4a2487036 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 @@ -36,7 +36,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'tags': typing.Union[parameter_0.tags, list, tuple, ], + 'tags': typing.Union[parameter_0.schema, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( 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 91d1d13f274..365dbbe9bd2 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 @@ -35,7 +35,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'tags': typing.Union[parameter_0.tags, list, tuple, ], + 'tags': typing.Union[parameter_0.schema, list, tuple, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py index 855d13d8349..885aa2a1900 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py @@ -27,7 +27,7 @@ -class tags( +class schema( schemas.ListSchema ): @@ -39,7 +39,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, - ) -> 'tags': + ) -> 'schema': return super().__new__( cls, arg, @@ -53,6 +53,6 @@ def __getitem__(self, i: int) -> MetaOapg.items: parameter_oapg = api_client.QueryParameter( name="tags", style=api_client.ParameterStyle.FORM, - schema=tags, + schema=schema, required=True, ), 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 15c7b30f532..4d2bb9942c9 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 @@ -41,7 +41,7 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[parameter_0.api_key, str, ], + 'api_key': typing.Union[parameter_0.items, str, ], }, total=False ) @@ -59,7 +59,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_1.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_1.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 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 c2d6b768ae5..c7aaebe8e99 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 @@ -40,7 +40,7 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[parameter_0.api_key, str, ], + 'api_key': typing.Union[parameter_0.items, str, ], }, total=False ) @@ -58,7 +58,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_1.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_1.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py index d03e0e890af..236cf812790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -petId = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=petId, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py index beed13e9082..d37eb5f4410 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -api_key = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="api_key", style=api_client.ParameterStyle.SIMPLE, - schema=api_key, + schema=items, ), 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 4a1ccfafcbd..651abcd4b1f 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 @@ -37,7 +37,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 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 3b725e50932..8297b30ea73 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 @@ -36,7 +36,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py index d03e0e890af..236cf812790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -petId = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=petId, + schema=schema, required=True, ), 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 5ac06d7dbb1..ba8b62f5c3f 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 @@ -9,7 +9,6 @@ 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 @@ -27,9 +26,7 @@ from .. import path from . import response_for_405 -from . import request_body from . import parameter_0 -from . import body @@ -37,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -68,30 +65,15 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form_oapg( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _update_pet_with_form_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -100,8 +82,6 @@ def _update_pet_with_form_oapg( @typing.overload def _update_pet_with_form_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -112,8 +92,6 @@ def _update_pet_with_form_oapg( def _update_pet_with_form_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -138,25 +116,11 @@ class instances for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() # TODO add cookie handling - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -183,30 +147,15 @@ class UpdatePetWithForm(BaseApi): @typing.overload def update_pet_with_form( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def update_pet_with_form( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -215,8 +164,6 @@ def update_pet_with_form( @typing.overload def update_pet_with_form( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -227,17 +174,13 @@ def update_pet_with_form( def update_pet_with_form( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( - body=body, path_params=path_params, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -250,30 +193,15 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -282,8 +210,6 @@ def post( @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -294,17 +220,13 @@ def post( def post( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( - body=body, path_params=path_params, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi index 8a10d770b6d..7d0faabe835 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 @@ -9,7 +9,6 @@ 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 @@ -26,9 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_405 -from . import request_body from . import parameter_0 -from . import body @@ -36,7 +33,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -59,30 +56,15 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form_oapg( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _update_pet_with_form_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -91,8 +73,6 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -103,8 +83,6 @@ class BaseApi(api_client.Api): def _update_pet_with_form_oapg( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, @@ -129,25 +107,11 @@ class BaseApi(api_client.Api): for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() # TODO add cookie handling - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -174,30 +138,15 @@ class UpdatePetWithForm(BaseApi): @typing.overload def update_pet_with_form( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def update_pet_with_form( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -206,8 +155,6 @@ class UpdatePetWithForm(BaseApi): @typing.overload def update_pet_with_form( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -218,17 +165,13 @@ class UpdatePetWithForm(BaseApi): def update_pet_with_form( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( - body=body, path_params=path_params, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -241,30 +184,15 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[request_body.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] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -273,8 +201,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -285,17 +211,13 @@ class ApiForpost(BaseApi): def post( self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( - body=body, path_params=path_params, - content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py index d03e0e890af..236cf812790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -petId = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=petId, + schema=schema, 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 e0ebd0f51a0..9fc6023aab1 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 @@ -27,9 +27,7 @@ from .. import path from . import response_for_200 -from . import request_body from . import parameter_0 -from . import body @@ -37,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -71,8 +69,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -82,27 +78,10 @@ def _upload_image_oapg( response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_image_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_image_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -112,8 +91,6 @@ def _upload_image_oapg( @typing.overload def _upload_image_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -126,8 +103,6 @@ def _upload_image_oapg( def _upload_image_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -160,21 +135,10 @@ class instances 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -201,8 +165,6 @@ class UploadImage(BaseApi): @typing.overload def upload_image( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -212,27 +174,10 @@ def upload_image( response_for_200.ApiResponse, ]: ... - @typing.overload - def upload_image( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def upload_image( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -242,8 +187,6 @@ def upload_image( @typing.overload def upload_image( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -256,8 +199,6 @@ def upload_image( def upload_image( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -265,9 +206,7 @@ def upload_image( skip_deserialization: bool = False, ): return self._upload_image_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -281,8 +220,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -292,27 +229,10 @@ def post( response_for_200.ApiResponse, ]: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -322,8 +242,6 @@ def post( @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -336,8 +254,6 @@ def post( def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -345,9 +261,7 @@ def post( skip_deserialization: bool = False, ): return self._upload_image_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, 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 0a51148d16f..a654dec28bf 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 @@ -26,9 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 -from . import request_body from . import parameter_0 -from . import body @@ -36,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'petId': typing.Union[parameter_0.petId, decimal.Decimal, int, ], + 'petId': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -62,8 +60,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image_oapg( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -73,27 +69,10 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... - @typing.overload - def _upload_image_oapg( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def _upload_image_oapg( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -103,8 +82,6 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image_oapg( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -117,8 +94,6 @@ class BaseApi(api_client.Api): def _upload_image_oapg( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -151,21 +126,10 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_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, @@ -192,8 +156,6 @@ class UploadImage(BaseApi): @typing.overload def upload_image( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -203,27 +165,10 @@ class UploadImage(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def upload_image( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def upload_image( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -233,8 +178,6 @@ class UploadImage(BaseApi): @typing.overload def upload_image( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -247,8 +190,6 @@ class UploadImage(BaseApi): def upload_image( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -256,9 +197,7 @@ class UploadImage(BaseApi): skip_deserialization: bool = False, ): return self._upload_image_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -272,8 +211,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[request_body.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, @@ -283,27 +220,10 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[request_body.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[ - response_for_200.ApiResponse, - ]: ... - - @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[request_body.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, @@ -313,8 +233,6 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - content_type: str = ..., - body: typing.Union[request_body.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, @@ -327,8 +245,6 @@ class ApiForpost(BaseApi): def post( self, - content_type: str = 'multipart/form-data', - body: typing.Union[request_body.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, @@ -336,9 +252,7 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ): return self._upload_image_oapg( - body=body, path_params=path_params, - content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py index d03e0e890af..236cf812790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -petId = schemas.Int64Schema +schema = schemas.Int64Schema parameter_oapg = api_client.PathParameter( name="petId", style=api_client.ParameterStyle.SIMPLE, - schema=petId, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py index 52233bb5458..6062a3b674a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.py @@ -31,7 +31,6 @@ from . import response_for_200 from . import response_for_400 from . import request_body -from . import order _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi index 01821c23d8e..d746aa5a746 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/__init__.pyi @@ -30,7 +30,6 @@ from petstore_api.model.order import Order from . import response_for_200 from . import response_for_400 from . import request_body -from . import order _all_accept_content_types = ( 'application/xml', 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 7c3d01af2af..1dfbf8d61fd 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 @@ -35,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[parameter_0.order_id, str, ], + 'order_id': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 39e42e0b437..6104cb71b6d 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 @@ -34,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[parameter_0.order_id, str, ], + 'order_id': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py index 3e170d924ea..322f92896ae 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -order_id = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=order_id, + schema=items, 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 8210674fca9..85467dbaaf9 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 @@ -37,7 +37,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[parameter_0.order_id, decimal.Decimal, int, ], + 'order_id': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 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 33af9e85c89..aa871286612 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 @@ -36,7 +36,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[parameter_0.order_id, decimal.Decimal, int, ], + 'order_id': typing.Union[parameter_0.schema, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py index e44b7db4cb6..7619d6890a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py @@ -27,7 +27,7 @@ -class order_id( +class schema( schemas.Int64Schema ): @@ -41,6 +41,6 @@ class MetaOapg: parameter_oapg = api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=order_id, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py index 5b872e86071..1714a409b53 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_default from . import request_body -from . import user _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi index 05f006656b4..605301b75b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.user import User from . import response_for_default from . import request_body -from . import user diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py index 2539007ed42..237c4aea51d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_default from . import request_body -from . import user _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi index 6244f1f099e..7fe43bf905e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.user import User from . import response_for_default from . import request_body -from . import user diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py index da59cd7c9b0..eb7c0d373e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.py @@ -30,7 +30,6 @@ from .. import path from . import response_for_default from . import request_body -from . import user _status_code_to_response = { diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi index 9a88a40f16f..ac124ef6712 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/__init__.pyi @@ -29,7 +29,6 @@ from petstore_api.model.user import User from . import response_for_default from . import request_body -from . import user 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 d522b15ee90..9b08f0aa24d 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 @@ -37,8 +37,8 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], - 'password': typing.Union[parameter_1.password, str, ], + 'username': typing.Union[parameter_0.items, str, ], + 'password': typing.Union[parameter_1.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 8d5697fa6a3..21748ecfa89 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 @@ -36,8 +36,8 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], - 'password': typing.Union[parameter_1.password, str, ], + 'username': typing.Union[parameter_0.items, str, ], + 'password': typing.Union[parameter_1.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py index 04db42da9b7..725f231d6a6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -username = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="username", style=api_client.ParameterStyle.FORM, - schema=username, + schema=items, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py index a31d8119a5e..5cc59ee263f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -password = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="password", style=api_client.ParameterStyle.FORM, - schema=password, + schema=items, 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 1ca671661a7..31da14238fe 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 @@ -25,8 +25,8 @@ class Header: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'X-Rate-Limit': typing.Union[x_rate_limit.x_rate_limit, decimal.Decimal, int, ], - 'X-Expires-After': typing.Union[x_expires_after.x_expires_after, str, datetime, ], + 'X-Rate-Limit': typing.Union[x_rate_limit.schema, decimal.Decimal, int, ], + 'X-Expires-After': typing.Union[x_expires_after.schema, str, datetime, ], }, total=False ) 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 99ea33dbb11..6baa31f35d7 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 @@ -35,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], + 'username': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 2e95a35b05a..5a7b1936d1a 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 @@ -34,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], + 'username': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py index c64a98edbf8..ffb3faf7a1e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -username = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=username, + schema=items, 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 7eae70f1fbc..fd98c666dce 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 @@ -37,7 +37,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], + 'username': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 fb69e9be7ef..3d23c697719 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 @@ -36,7 +36,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], + 'username': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py index c64a98edbf8..ffb3faf7a1e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -username = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=username, + schema=items, required=True, ), 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 15c65075e58..79509a1152e 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 @@ -32,7 +32,6 @@ from . import response_for_404 from . import request_body from . import parameter_0 -from . import user @@ -40,7 +39,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], + 'username': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 06e9744e100..6f250d8492d 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 @@ -31,7 +31,6 @@ from . import response_for_400 from . import response_for_404 from . import request_body from . import parameter_0 -from . import user @@ -39,7 +38,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.username, str, ], + 'username': typing.Union[parameter_0.items, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py index 1ad71e806f3..7bdf0445df8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py @@ -27,12 +27,12 @@ from petstore_api.model.user import User -username = schemas.StrSchema +items = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=username, + schema=items, required=True, ), From aee4b2aa391f366c20aa3c44356e3bc2ab437e47 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 16:12:02 -0700 Subject: [PATCH 05/23] Samples regenerated --- .../main/resources/python/api_doc.handlebars | 2 +- .../client/3_0_3_unit_test/python/README.md | 18 ++++++++- .../python/README.md | 22 ++++++++-- .../python/.openapi-generator/VERSION | 2 +- .../python/docs/apis/tags/AnotherFakeApi.md | 2 +- .../petstore/python/docs/apis/tags/FakeApi.md | 40 +++++++++---------- .../docs/apis/tags/FakeClassnameTags123Api.md | 2 +- .../petstore/python/docs/apis/tags/PetApi.md | 8 ++-- .../python/docs/apis/tags/StoreApi.md | 2 +- .../petstore/python/docs/apis/tags/UserApi.md | 8 ++-- 10 files changed, 67 insertions(+), 39 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 47d0dea55a7..7a4d6b94b13 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 @@ -84,7 +84,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body {{#each content}} {{#with this.schema}} -{{> api_doc_schema_type_hint anchorPrefix=../operationId schemaNamePrefix1="request_body." complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../operationId schemaNamePrefix1="request_body" complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/with}} 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 4f59780c066..6ea9e35131c 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 @@ -155,18 +155,32 @@ configuration = unit_test_api.Configuration( host = "https://someserver.com/v1" ) +```python +import unit_test_api +from unit_test_api.apis.tags import ref_api +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ref_api.RefApi(api_client) - property_named_ref_that_is_not_a_reference = PropertyNamedRefThatIsNotAReference(None) # PropertyNamedRefThatIsNotAReference | + # example passing only required values which don't have defaults set + body = PropertyNamedRefThatIsNotAReference(None) try: - api_instance.post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) + api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( + body=body, + ) except unit_test_api.ApiException as e: print("Exception when calling RefApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` +``` ## Documentation for API Endpoints diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md index 012012384bc..8692309f638 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md @@ -148,22 +148,36 @@ configuration = this_package.Configuration( host = "http://localhost:3000" ) +```python +import this_package +from this_package.apis.tags import default_api +from this_package.model.operator import Operator +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = this_package.Configuration( + host = "http://localhost:3000" +) # Enter a context with an instance of the API client with this_package.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) - operator = Operator( + + # example passing only optional values + body = Operator( a=3.14, b=3.14, operator_id="ADD", - ) # Operator | (optional) - + ) try: - api_instance.post_operators(operator=operator) + api_response = api_instance.post_operators( + body=body, + ) except this_package.ApiException as e: print("Exception when calling DefaultApi->post_operators: %s\n" % e) ``` +``` ## Documentation for API Endpoints 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 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 1371fa40784..35977ee2192 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md @@ -58,7 +58,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index 7d8f959b441..75486e50326 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -90,7 +90,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -171,7 +171,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -252,7 +252,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -336,7 +336,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**FileSchemaTestClass**](../../models/FileSchemaTestClass.md) | | @@ -424,7 +424,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -512,7 +512,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Boolean**](../../models/Boolean.md) | | @@ -691,7 +691,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -770,7 +770,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -1386,7 +1386,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1472,7 +1472,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1492,7 +1492,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# request_body..multipart_form_data +# request_body.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1761,7 +1761,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json_patchjson +# request_body.application_json_patchjson Type | Description | Notes ------------- | ------------- | ------------- [**JSONPatchRequest**](../../models/JSONPatchRequest.md) | | @@ -1833,7 +1833,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json_charsetutf_8 +# request_body.application_json_charsetutf_8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1918,7 +1918,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -1997,7 +1997,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2166,7 +2166,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2305,7 +2305,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2933,7 +2933,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**String**](../../models/String.md) | | @@ -3012,7 +3012,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3090,7 +3090,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_octet_stream +# request_body.application_octet_stream file to upload 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 ebc9ed7f5fd..70ab394877f 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md @@ -69,7 +69,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.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 b71d0b02c72..259e53b1e58 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -151,13 +151,13 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# request_body..application_xml +# request_body.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -951,13 +951,13 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# request_body..application_xml +# request_body.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.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 553271a8961..1921fc045b9 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -338,7 +338,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.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 04533d9df7a..34cdbd28fc2 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -75,7 +75,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -162,7 +162,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -255,7 +255,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -731,7 +731,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body -# request_body..application_json +# request_body.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | From dd530161ba2d248709ca98cd93a61648b2c8ed71 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 16:31:21 -0700 Subject: [PATCH 06/23] Fixes readme example --- .../main/resources/python/README_common.handlebars | 11 ----------- .../petstore/python/.openapi-generator/VERSION | 2 +- samples/openapi3/client/petstore/python/README.md | 14 -------------- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars index f5f635bb240..f79c4294b28 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/README_common.handlebars @@ -1,19 +1,9 @@ -```python -{{#with apiInfo}}{{#each apis}}{{#unless hasMore}}{{#if hasHttpSignatureMethods}}import datetime{{/if}}{{/unless}}{{/each}}{{/with}} -import time -import {{{packageName}}} -from pprint import pprint {{#with apiInfo}} {{#each apis}} {{#if @first}} -from {{packageName}}.{{apiPackage}}.tags import {{classFilename}} -{{#each imports}} -{{{import}}} -{{/each}} {{#with operations}} {{#each operation}} {{#if @first}} -{{> doc_auth_partial}} {{> api_doc_example }} {{/if}} {{/each}} @@ -21,7 +11,6 @@ from {{packageName}}.{{apiPackage}}.tags import {{classFilename}} {{/if}} {{/each}} {{/with}} -``` ## Documentation for API Endpoints 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/README.md b/samples/openapi3/client/petstore/python/README.md index db2f350a411..170f3fbb643 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -135,19 +135,6 @@ import petstore_api Please follow the [installation procedure](#installation--usage) and then run the following: -```python -import datetimeimport datetimeimport datetimeimport datetimeimport datetimeimport datetimeimport datetime -import time -import petstore_api -from pprint import pprint -from petstore_api.apis.tags import another_fake_api -from petstore_api.model.client import Client -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - ```python import petstore_api from petstore_api.apis.tags import another_fake_api @@ -177,7 +164,6 @@ with petstore_api.ApiClient(configuration) as api_client: except petstore_api.ApiException as e: print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` -``` ## Documentation for API Endpoints From 7773832c731501951de0d7d55ccd3fa559ad738b Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 17:02:31 -0700 Subject: [PATCH 07/23] simplifies setting items and additional_properties var names --- .../openapitools/codegen/DefaultCodegen.java | 12 +-- .../languages/PythonClientCodegen.java | 13 +--- .../petstore/python/docs/apis/tags/FakeApi.md | 78 +++++++++---------- .../petstore/python/docs/apis/tags/PetApi.md | 4 +- .../python/docs/apis/tags/StoreApi.md | 4 +- .../petstore/python/docs/apis/tags/UserApi.md | 16 ++-- .../put/__init__.py | 2 +- .../put/__init__.pyi | 2 +- .../put/parameter_0.py | 4 +- .../put/__init__.py | 6 +- .../put/__init__.pyi | 6 +- .../put/parameter_0.py | 4 +- .../put/parameter_1.py | 4 +- .../put/parameter_2.py | 4 +- .../fake_delete_coffee_id/delete/__init__.py | 2 +- .../fake_delete_coffee_id/delete/__init__.pyi | 2 +- .../delete/parameter_0.py | 4 +- .../post/__init__.py | 38 ++++----- .../post/__init__.pyi | 38 ++++----- .../post/parameter_0.py | 4 +- .../post/parameter_1.py | 4 +- .../post/parameter_10.py | 4 +- .../post/parameter_11.py | 4 +- .../post/parameter_12.py | 4 +- .../post/parameter_13.py | 4 +- .../post/parameter_14.py | 4 +- .../post/parameter_15.py | 4 +- .../post/parameter_16.py | 4 +- .../post/parameter_17.py | 4 +- .../post/parameter_18.py | 4 +- .../post/parameter_2.py | 4 +- .../post/parameter_3.py | 4 +- .../post/parameter_4.py | 4 +- .../post/parameter_5.py | 4 +- .../post/parameter_6.py | 4 +- .../post/parameter_7.py | 4 +- .../post/parameter_8.py | 4 +- .../post/parameter_9.py | 4 +- .../paths/pet_pet_id/delete/__init__.py | 2 +- .../paths/pet_pet_id/delete/__init__.pyi | 2 +- .../paths/pet_pet_id/delete/parameter_1.py | 4 +- .../store_order_order_id/delete/__init__.py | 2 +- .../store_order_order_id/delete/__init__.pyi | 2 +- .../delete/parameter_0.py | 4 +- .../paths/user_login/get/__init__.py | 4 +- .../paths/user_login/get/__init__.pyi | 4 +- .../paths/user_login/get/parameter_0.py | 4 +- .../paths/user_login/get/parameter_1.py | 4 +- .../paths/user_username/delete/__init__.py | 2 +- .../paths/user_username/delete/__init__.pyi | 2 +- .../paths/user_username/delete/parameter_0.py | 4 +- .../paths/user_username/get/__init__.py | 2 +- .../paths/user_username/get/__init__.pyi | 2 +- .../paths/user_username/get/parameter_0.py | 4 +- .../paths/user_username/put/__init__.py | 2 +- .../paths/user_username/put/__init__.pyi | 2 +- .../paths/user_username/put/parameter_0.py | 4 +- 57 files changed, 178 insertions(+), 197 deletions(-) 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 e5f04775754..7a807e5ec94 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 @@ -2919,7 +2919,7 @@ public CodegenModel fromModel(String name, Schema schema) { m.setFormat(schema.getFormat()); m.setComposedSchemas(getComposedSchemas(schema)); if (ModelUtils.isArraySchema(schema)) { - CodegenProperty arrayProperty = fromProperty(name, schema, false); + CodegenProperty arrayProperty = fromProperty("items", schema, false); m.setItems(arrayProperty.items); m.arrayModelType = arrayProperty.complexType; addParentContainer(m, name, schema); @@ -3834,17 +3834,9 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo property.xmlName = p.getXml().getName(); } - // handle inner property - String itemName = null; - if (p.getExtensions() != null && p.getExtensions().get("x-item-name") != null) { - itemName = p.getExtensions().get("x-item-name").toString(); - } - if (itemName == null) { - itemName = property.name; - } ArraySchema arraySchema = (ArraySchema) p; Schema innerSchema = unaliasSchema(getSchemaItems(arraySchema)); - CodegenProperty cp = fromProperty(itemName, innerSchema, false); + CodegenProperty cp = fromProperty("items", innerSchema, false); updatePropertyForArray(property, cp); } else if (ModelUtils.isTypeObjectSchema(p)) { updatePropertyForObject(property, p); 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 248b9431bd5..7eaeace3ad8 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 @@ -1031,19 +1031,9 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo if (cp.isPrimitiveType && unaliasedSchema.get$ref() != null) { cp.complexType = cp.dataType; } - setAdditionalPropsAndItemsVarNames(cp); return cp; } - private void setAdditionalPropsAndItemsVarNames(IJsonSchemaValidationProperties item) { - if (item.getAdditionalProperties() != null) { - item.getAdditionalProperties().setBaseName("additional_properties"); - } - if (item.getItems() != null) { - item.getItems().setBaseName("items"); - } - } - /** * checks if the data should be classified as "string" in enum * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string @@ -1467,7 +1457,6 @@ public CodegenModel fromModel(String name, Schema sc) { cm.setHasMultipleTypes(true); } Boolean isNotPythonModelSimpleModel = (ModelUtils.isComposedSchema(sc) || ModelUtils.isObjectSchema(sc) || ModelUtils.isMapSchema(sc)); - setAdditionalPropsAndItemsVarNames(cm); if (isNotPythonModelSimpleModel) { return cm; } @@ -2229,7 +2218,7 @@ protected void setAddProps(Schema schema, IJsonSchemaValidationProperties proper if (addPropsSchema == null) { return; } - CodegenProperty addPropProp = fromProperty("", addPropsSchema, false, false); + CodegenProperty addPropProp = fromProperty("additional_properties", addPropsSchema, false, false); property.setAdditionalProperties(addPropProp); } 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 75486e50326..0cb09be17e4 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -438,7 +438,7 @@ Key | Input Type | Description | Notes query | [parameter_0.schema](#body_with_query_params.parameter_0.schema) | | -# parameter_0.items +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -599,21 +599,21 @@ SomeVar | [parameter_1.schema](#case_sensitive_params.parameter_1.schema) | | some_var | [parameter_2.schema](#case_sensitive_params.parameter_2.schema) | | -# parameter_0.items +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_1.items +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_2.items +# parameter_2.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -852,9 +852,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -id | [RequestPathParameters.Schemas.items](#delete_coffee.RequestPathParameters.Schemas.items) | | +id | [RequestPathParameters.Schemas.schema](#delete_coffee.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2324,35 +2324,35 @@ self | [parameter_3.schema](#parameter_collisions.parameter_3.schema) | | option A-B | [parameter_4.schema](#parameter_collisions.parameter_4.schema) | | optional -# parameter_0.items +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_1.items +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_2.items +# parameter_2.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_3.items +# parameter_3.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_4.items +# parameter_4.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2364,33 +2364,33 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional -aB | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional -self | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional -A-B | [RequestHeaderParameters.Schemas.items](#parameter_collisions.RequestHeaderParameters.Schemas.items) | | optional +1 | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional +aB | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional +self | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional +A-B | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional -# RequestHeaderParameters.Schemas..items +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas..items +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas..items +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas..items +# RequestHeaderParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2402,41 +2402,41 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | -aB | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | -Ab | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | -self | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | -A-B | [RequestPathParameters.Schemas.items](#parameter_collisions.RequestPathParameters.Schemas.items) | | +1 | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | +aB | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | +Ab | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | +self | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | +A-B | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2448,41 +2448,41 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional -aB | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional -Ab | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional -self | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional -A-B | [RequestCookieParameters.Schemas.items](#parameter_collisions.RequestCookieParameters.Schemas.items) | | optional +1 | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional +aB | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional +Ab | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional +self | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional +A-B | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional -# RequestCookieParameters.Schemas..items +# RequestCookieParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..items +# RequestCookieParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..items +# RequestCookieParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..items +# RequestCookieParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..items +# RequestCookieParameters.Schemas..schema ## 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 259e53b1e58..5bc325c3f59 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -270,9 +270,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -api_key | [RequestHeaderParameters.Schemas.items](#delete_pet.RequestHeaderParameters.Schemas.items) | | optional +api_key | [RequestHeaderParameters.Schemas.schema](#delete_pet.RequestHeaderParameters.Schemas.schema) | | optional -# RequestHeaderParameters.Schemas..items +# RequestHeaderParameters.Schemas..schema ## 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 1921fc045b9..56856b3dbdc 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -60,9 +60,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | [RequestPathParameters.Schemas.items](#delete_order.RequestPathParameters.Schemas.items) | | +order_id | [RequestPathParameters.Schemas.schema](#delete_order.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## 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 34cdbd28fc2..0459f06c059 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -337,9 +337,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.items](#delete_user.RequestPathParameters.Schemas.items) | | +username | [RequestPathParameters.Schemas.schema](#delete_user.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -424,9 +424,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.items](#get_user_by_name.RequestPathParameters.Schemas.items) | | +username | [RequestPathParameters.Schemas.schema](#get_user_by_name.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -536,14 +536,14 @@ username | [parameter_0.schema](#login_user.parameter_0.schema) | | password | [parameter_1.schema](#login_user.parameter_1.schema) | | -# parameter_0.items +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# parameter_1.items +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -742,9 +742,9 @@ Type | Description | Notes Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.items](#update_user.RequestPathParameters.Schemas.items) | | +username | [RequestPathParameters.Schemas.schema](#update_user.RequestPathParameters.Schemas.schema) | | -# RequestPathParameters.Schemas..items +# RequestPathParameters.Schemas..schema ## Model Type Info Input Type | Accessed Type | Description | Notes 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 15d2eb2f8d3..a213e737137 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 @@ -38,7 +38,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[parameter_0.items, str, ], + 'query': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 37c8f2eba6a..edbe66b4a97 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 @@ -37,7 +37,7 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'query': typing.Union[parameter_0.items, str, ], + 'query': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py index 227026e4e0c..14b4cceea38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py @@ -27,13 +27,13 @@ from petstore_api.model.user import User -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="query", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, 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 6447c93549f..6594d4e0948 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 @@ -36,9 +36,9 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[parameter_0.items, str, ], - 'SomeVar': typing.Union[parameter_1.items, str, ], - 'some_var': typing.Union[parameter_2.items, str, ], + 'someVar': typing.Union[parameter_0.schema, str, ], + 'SomeVar': typing.Union[parameter_1.schema, str, ], + 'some_var': typing.Union[parameter_2.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 6b682ae6208..5ec1ae1279d 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 @@ -35,9 +35,9 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'someVar': typing.Union[parameter_0.items, str, ], - 'SomeVar': typing.Union[parameter_1.items, str, ], - 'some_var': typing.Union[parameter_2.items, str, ], + 'someVar': typing.Union[parameter_0.schema, str, ], + 'SomeVar': typing.Union[parameter_1.schema, str, ], + 'some_var': typing.Union[parameter_2.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py index 73d572108b7..7c85255f1f2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="someVar", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py index b107ed43732..b1a857aa046 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="SomeVar", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py index 261d5a5255e..b36ff3bd622 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="some_var", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, 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 4f4cffd9cd7..4193a4112a6 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 @@ -35,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[parameter_0.items, str, ], + 'id': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 68e60f31699..be54450aaa9 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 @@ -34,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'id': typing.Union[parameter_0.items, str, ], + 'id': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py index bc694b5fd53..78c82fea555 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="id", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=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 bdc884f1973..66bf2add7c6 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 @@ -59,11 +59,11 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_0.items, str, ], - 'aB': typing.Union[parameter_1.items, str, ], - 'Ab': typing.Union[parameter_2.items, str, ], - 'self': typing.Union[parameter_3.items, str, ], - 'A-B': typing.Union[parameter_4.items, str, ], + '1': typing.Union[parameter_0.schema, str, ], + 'aB': typing.Union[parameter_1.schema, str, ], + 'Ab': typing.Union[parameter_2.schema, str, ], + 'self': typing.Union[parameter_3.schema, str, ], + 'A-B': typing.Union[parameter_4.schema, str, ], }, total=False ) @@ -90,10 +90,10 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_5.items, str, ], - 'aB': typing.Union[parameter_6.items, str, ], - 'self': typing.Union[parameter_7.items, str, ], - 'A-B': typing.Union[parameter_8.items, str, ], + '1': typing.Union[parameter_5.schema, str, ], + 'aB': typing.Union[parameter_6.schema, str, ], + 'self': typing.Union[parameter_7.schema, str, ], + 'A-B': typing.Union[parameter_8.schema, str, ], }, total=False ) @@ -114,11 +114,11 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '1': typing.Union[parameter_9.items, str, ], - 'aB': typing.Union[parameter_10.items, str, ], - 'Ab': typing.Union[parameter_11.items, str, ], - 'self': typing.Union[parameter_12.items, str, ], - 'A-B': typing.Union[parameter_13.items, str, ], + '1': typing.Union[parameter_9.schema, str, ], + 'aB': typing.Union[parameter_10.schema, str, ], + 'Ab': typing.Union[parameter_11.schema, str, ], + 'self': typing.Union[parameter_12.schema, str, ], + 'A-B': typing.Union[parameter_13.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -150,11 +150,11 @@ class RequestCookieParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_14.items, str, ], - 'aB': typing.Union[parameter_15.items, str, ], - 'Ab': typing.Union[parameter_16.items, str, ], - 'self': typing.Union[parameter_17.items, str, ], - 'A-B': typing.Union[parameter_18.items, str, ], + '1': typing.Union[parameter_14.schema, str, ], + 'aB': typing.Union[parameter_15.schema, str, ], + 'Ab': typing.Union[parameter_16.schema, str, ], + 'self': typing.Union[parameter_17.schema, str, ], + 'A-B': typing.Union[parameter_18.schema, str, ], }, total=False ) 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 d0a7207ae60..1509319ffa4 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 @@ -58,11 +58,11 @@ class RequestQueryParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_0.items, str, ], - 'aB': typing.Union[parameter_1.items, str, ], - 'Ab': typing.Union[parameter_2.items, str, ], - 'self': typing.Union[parameter_3.items, str, ], - 'A-B': typing.Union[parameter_4.items, str, ], + '1': typing.Union[parameter_0.schema, str, ], + 'aB': typing.Union[parameter_1.schema, str, ], + 'Ab': typing.Union[parameter_2.schema, str, ], + 'self': typing.Union[parameter_3.schema, str, ], + 'A-B': typing.Union[parameter_4.schema, str, ], }, total=False ) @@ -89,10 +89,10 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_5.items, str, ], - 'aB': typing.Union[parameter_6.items, str, ], - 'self': typing.Union[parameter_7.items, str, ], - 'A-B': typing.Union[parameter_8.items, str, ], + '1': typing.Union[parameter_5.schema, str, ], + 'aB': typing.Union[parameter_6.schema, str, ], + 'self': typing.Union[parameter_7.schema, str, ], + 'A-B': typing.Union[parameter_8.schema, str, ], }, total=False ) @@ -113,11 +113,11 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - '1': typing.Union[parameter_9.items, str, ], - 'aB': typing.Union[parameter_10.items, str, ], - 'Ab': typing.Union[parameter_11.items, str, ], - 'self': typing.Union[parameter_12.items, str, ], - 'A-B': typing.Union[parameter_13.items, str, ], + '1': typing.Union[parameter_9.schema, str, ], + 'aB': typing.Union[parameter_10.schema, str, ], + 'Ab': typing.Union[parameter_11.schema, str, ], + 'self': typing.Union[parameter_12.schema, str, ], + 'A-B': typing.Union[parameter_13.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( @@ -149,11 +149,11 @@ class RequestCookieParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - '1': typing.Union[parameter_14.items, str, ], - 'aB': typing.Union[parameter_15.items, str, ], - 'Ab': typing.Union[parameter_16.items, str, ], - 'self': typing.Union[parameter_17.items, str, ], - 'A-B': typing.Union[parameter_18.items, str, ], + '1': typing.Union[parameter_14.schema, str, ], + 'aB': typing.Union[parameter_15.schema, str, ], + 'Ab': typing.Union[parameter_16.schema, str, ], + 'self': typing.Union[parameter_17.schema, str, ], + 'A-B': typing.Union[parameter_18.schema, str, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py index e62a56458b7..4a94857a42e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py index 5ed117feaf1..21be71ad794 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py index 32f4f6fefc4..864fbf20697 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="1", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py index 411b4618ccd..31bcdea5576 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="aB", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py index 245a7a36bd5..98cf429af66 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py index 5f7d7d4ca2e..037663edb72 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py index 31c505e69c0..81a597f47d8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py index e02e642a736..bca25b3e3b1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py index 598e54d05e0..bd3479828f0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py index cb0699e6a3a..077d608aa53 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py index 496df571f2a..beaa5ffe8c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.CookieParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py index 9c6e91ffbc2..b6234e65d04 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="Ab", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py index f1897ce63d4..3d4d0e4cdb5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="self", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py index 0618681d22c..2e7e164fb3b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py index 04ce58c3da7..9269b212128 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="1", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py index 3264878ddf6..fba4d5802ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="aB", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py index d5c7ba5b0c0..8ffbc18bf6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="Ab", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py index fa36146b6a1..811565caf05 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="self", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py index 1d7184dc61d..73a475d20de 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="A-B", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, explode=True, ), 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 4d2bb9942c9..c4b6fb968b9 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 @@ -41,7 +41,7 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[parameter_0.items, str, ], + 'api_key': typing.Union[parameter_0.schema, str, ], }, total=False ) 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 c7aaebe8e99..a3badb59e12 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 @@ -40,7 +40,7 @@ class RequestHeaderParameters: OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'api_key': typing.Union[parameter_0.items, str, ], + 'api_key': typing.Union[parameter_0.schema, str, ], }, total=False ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py index d37eb5f4410..6d45e4883ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py @@ -25,11 +25,11 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.HeaderParameter( name="api_key", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, ), 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 1dfbf8d61fd..c73369e38ee 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 @@ -35,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[parameter_0.items, str, ], + 'order_id': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 6104cb71b6d..c0b414e8d89 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 @@ -34,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'order_id': typing.Union[parameter_0.items, str, ], + 'order_id': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py index 322f92896ae..a1802dd22ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="order_id", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), 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 9b08f0aa24d..e07e7ddae3d 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 @@ -37,8 +37,8 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], - 'password': typing.Union[parameter_1.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], + 'password': typing.Union[parameter_1.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 21748ecfa89..b1f632212ca 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 @@ -36,8 +36,8 @@ class RequestQueryParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], - 'password': typing.Union[parameter_1.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], + 'password': typing.Union[parameter_1.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py index 725f231d6a6..4a67445accf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="username", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, required=True, explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py index 5cc59ee263f..cc83d18a0e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py @@ -25,13 +25,13 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.QueryParameter( name="password", style=api_client.ParameterStyle.FORM, - schema=items, + schema=schema, required=True, explode=True, ), 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 6baa31f35d7..25c26c00494 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 @@ -35,7 +35,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 5a7b1936d1a..628b6fd01ec 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 @@ -34,7 +34,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py index ffb3faf7a1e..f6574145834 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, 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 fd98c666dce..aaa42ac8b3a 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 @@ -37,7 +37,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 3d23c697719..e2a8d09d166 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 @@ -36,7 +36,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py index ffb3faf7a1e..f6574145834 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py @@ -25,12 +25,12 @@ from petstore_api import schemas # noqa: F401 -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), 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 79509a1152e..da1564079b4 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 @@ -39,7 +39,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( 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 6f250d8492d..8281dc79653 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 @@ -38,7 +38,7 @@ class RequestPathParameters: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { - 'username': typing.Union[parameter_0.items, str, ], + 'username': typing.Union[parameter_0.schema, str, ], } ) OptionalParams = typing_extensions.TypedDict( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py index 7bdf0445df8..db095b94649 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py @@ -27,12 +27,12 @@ from petstore_api.model.user import User -items = schemas.StrSchema +schema = schemas.StrSchema parameter_oapg = api_client.PathParameter( name="username", style=api_client.ParameterStyle.SIMPLE, - schema=items, + schema=schema, required=True, ), From 421b420afa85dc87a8442b2f31bffaf0e7b413f2 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 17:07:25 -0700 Subject: [PATCH 08/23] Regenerates sample with fixed schema names --- .../main/resources/python/api_doc.handlebars | 12 +-- .../petstore/python/docs/apis/tags/FakeApi.md | 76 +++++++++---------- .../petstore/python/docs/apis/tags/PetApi.md | 24 +++--- .../python/docs/apis/tags/StoreApi.md | 8 +- .../petstore/python/docs/apis/tags/UserApi.md | 12 +-- 5 files changed, 66 insertions(+), 66 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 7a4d6b94b13..8075c8bf1f3 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 @@ -113,11 +113,11 @@ Key | Input 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}} +{{baseName}} | [{{paramName}}.schema](#{{../operationId}}.{{paramName}}.schema) | | {{#unless required}}optional{{/unless}} {{/each}} {{#each headerParams}} {{#with schema}} -{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestHeaderParameters.Schemas." complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1=../paramName complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} @@ -129,11 +129,11 @@ Key | Input 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}} +{{baseName}} | [{{paramName}}.schema](#{{../operationId}}.{{paramName}}.schema) | | {{#unless required}}optional{{/unless}} {{/each}} {{#each pathParams}} {{#with schema}} -{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestPathParameters.Schemas." complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1=../paramName complexTypePrefix="../../models/" }} {{/with}} {{/each}} {{/if}} @@ -145,11 +145,11 @@ Key | Input Type | Description | Notes Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- {{#each cookieParams}} -{{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}} +{{baseName}} | [{{paramName}}.schema](#{{../operationId}}.{{paramName}}.schema) | | {{#unless required}}optional{{/unless}} {{/each}} {{#each cookieParams}} {{#with schema}} -{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="RequestCookieParameters.Schemas." complexTypePrefix="../../models/" }} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1=../paramName 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 0cb09be17e4..a3e7baa036a 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -852,9 +852,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -id | [RequestPathParameters.Schemas.schema](#delete_coffee.RequestPathParameters.Schemas.schema) | | +id | [parameter_0.schema](#delete_coffee.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1069,10 +1069,10 @@ decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [1.1, -1.2 Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -enum_header_string_array | [RequestHeaderParameters.Schemas.schema](#enum_parameters.RequestHeaderParameters.Schemas.schema) | | optional -enum_header_string | [RequestHeaderParameters.Schemas.schema](#enum_parameters.RequestHeaderParameters.Schemas.schema) | | optional +enum_header_string_array | [parameter_0.schema](#enum_parameters.parameter_0.schema) | | optional +enum_header_string | [parameter_1.schema](#enum_parameters.parameter_1.schema) | | optional -# RequestHeaderParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1084,7 +1084,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 "$" -# RequestHeaderParameters.Schemas..schema +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1303,17 +1303,17 @@ decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -required_boolean_group | [RequestHeaderParameters.Schemas.schema](#group_parameters.RequestHeaderParameters.Schemas.schema) | | -boolean_group | [RequestHeaderParameters.Schemas.schema](#group_parameters.RequestHeaderParameters.Schemas.schema) | | optional +required_boolean_group | [parameter_1.schema](#group_parameters.parameter_1.schema) | | +boolean_group | [parameter_4.schema](#group_parameters.parameter_4.schema) | | optional -# RequestHeaderParameters.Schemas..schema +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | -# RequestHeaderParameters.Schemas..schema +# parameter_4.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2364,33 +2364,33 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional -aB | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional -self | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional -A-B | [RequestHeaderParameters.Schemas.schema](#parameter_collisions.RequestHeaderParameters.Schemas.schema) | | optional +1 | [parameter_5.schema](#parameter_collisions.parameter_5.schema) | | optional +aB | [parameter_6.schema](#parameter_collisions.parameter_6.schema) | | optional +self | [parameter_7.schema](#parameter_collisions.parameter_7.schema) | | optional +A-B | [parameter_8.schema](#parameter_collisions.parameter_8.schema) | | optional -# RequestHeaderParameters.Schemas..schema +# parameter_5.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas..schema +# parameter_6.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas..schema +# parameter_7.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestHeaderParameters.Schemas..schema +# parameter_8.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2402,41 +2402,41 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | -aB | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | -Ab | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | -self | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | -A-B | [RequestPathParameters.Schemas.schema](#parameter_collisions.RequestPathParameters.Schemas.schema) | | +1 | [parameter_9.schema](#parameter_collisions.parameter_9.schema) | | +aB | [parameter_10.schema](#parameter_collisions.parameter_10.schema) | | +Ab | [parameter_11.schema](#parameter_collisions.parameter_11.schema) | | +self | [parameter_12.schema](#parameter_collisions.parameter_12.schema) | | +A-B | [parameter_13.schema](#parameter_collisions.parameter_13.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_9.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..schema +# parameter_10.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..schema +# parameter_11.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..schema +# parameter_12.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestPathParameters.Schemas..schema +# parameter_13.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2448,41 +2448,41 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -1 | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional -aB | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional -Ab | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional -self | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional -A-B | [RequestCookieParameters.Schemas.schema](#parameter_collisions.RequestCookieParameters.Schemas.schema) | | optional +1 | [parameter_14.schema](#parameter_collisions.parameter_14.schema) | | optional +aB | [parameter_15.schema](#parameter_collisions.parameter_15.schema) | | optional +Ab | [parameter_16.schema](#parameter_collisions.parameter_16.schema) | | optional +self | [parameter_17.schema](#parameter_collisions.parameter_17.schema) | | optional +A-B | [parameter_18.schema](#parameter_collisions.parameter_18.schema) | | optional -# RequestCookieParameters.Schemas..schema +# parameter_14.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..schema +# parameter_15.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..schema +# parameter_16.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..schema +# parameter_17.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# RequestCookieParameters.Schemas..schema +# parameter_18.schema ## 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 5bc325c3f59..c57b08665f0 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -270,9 +270,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -api_key | [RequestHeaderParameters.Schemas.schema](#delete_pet.RequestHeaderParameters.Schemas.schema) | | optional +api_key | [parameter_0.schema](#delete_pet.parameter_0.schema) | | optional -# RequestHeaderParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -284,9 +284,9 @@ str, | str, | | Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.schema](#delete_pet.RequestPathParameters.Schemas.schema) | | +petId | [parameter_1.schema](#delete_pet.parameter_1.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_1.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -760,9 +760,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.schema](#get_pet_by_id.RequestPathParameters.Schemas.schema) | | +petId | [parameter_0.schema](#get_pet_by_id.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1058,9 +1058,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.schema](#update_pet_with_form.RequestPathParameters.Schemas.schema) | | +petId | [parameter_0.schema](#update_pet_with_form.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1148,9 +1148,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.schema](#upload_file_with_required_file.RequestPathParameters.Schemas.schema) | | +petId | [parameter_0.schema](#upload_file_with_required_file.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1244,9 +1244,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -petId | [RequestPathParameters.Schemas.schema](#upload_image.RequestPathParameters.Schemas.schema) | | +petId | [parameter_0.schema](#upload_image.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## 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 56856b3dbdc..51e0bfca4bf 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -60,9 +60,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | [RequestPathParameters.Schemas.schema](#delete_order.RequestPathParameters.Schemas.schema) | | +order_id | [parameter_0.schema](#delete_order.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -227,9 +227,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -order_id | [RequestPathParameters.Schemas.schema](#get_order_by_id.RequestPathParameters.Schemas.schema) | | +order_id | [parameter_0.schema](#get_order_by_id.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## 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 0459f06c059..eef84ebd141 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -337,9 +337,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.schema](#delete_user.RequestPathParameters.Schemas.schema) | | +username | [parameter_0.schema](#delete_user.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -424,9 +424,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.schema](#get_user_by_name.RequestPathParameters.Schemas.schema) | | +username | [parameter_0.schema](#get_user_by_name.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -742,9 +742,9 @@ Type | Description | Notes Key | Input Type | Description | Notes ------------- | ------------- | ------------- | ------------- -username | [RequestPathParameters.Schemas.schema](#update_user.RequestPathParameters.Schemas.schema) | | +username | [parameter_0.schema](#update_user.parameter_0.schema) | | -# RequestPathParameters.Schemas..schema +# parameter_0.schema ## Model Type Info Input Type | Accessed Type | Description | Notes From 16c94997e7ac258a85c7e5b95946dc9bb2c7e07f Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 17:21:24 -0700 Subject: [PATCH 09/23] Samples regenerated --- .../languages/PythonClientCodegen.java | 5 ++++- .../client/3_0_3_unit_test/python/README.md | 21 ------------------- .../python/README.md | 14 ------------- .../python/.openapi-generator/VERSION | 2 +- .../post/__init__.py | 10 ++++----- .../post/__init__.pyi | 10 ++++----- .../post/parameter_0.py | 6 +++--- .../post/parameter_1.py | 6 +++--- .../post/parameter_10.py | 5 +++-- .../post/parameter_11.py | 5 +++-- .../post/parameter_12.py | 3 ++- .../post/parameter_13.py | 3 ++- .../post/parameter_2.py | 6 +++--- .../post/parameter_3.py | 6 +++--- .../post/parameter_4.py | 6 +++--- .../post/parameter_5.py | 5 ++--- .../post/parameter_6.py | 5 ++--- .../post/parameter_7.py | 7 +++---- .../post/parameter_8.py | 7 +++---- .../post/parameter_9.py | 8 +++---- .../paths/pet_pet_id/delete/__init__.py | 2 +- .../paths/pet_pet_id/delete/__init__.pyi | 2 +- .../paths/pet_pet_id/delete/parameter_0.py | 7 +++---- .../paths/pet_pet_id/delete/parameter_1.py | 7 ++++--- 24 files changed, 63 insertions(+), 95 deletions(-) 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 7eaeace3ad8..555bd4fed9b 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 @@ -113,7 +113,10 @@ public PythonClientCodegen() { importBaseType = false; addSchemaImportsFromV3SpecLocations = true; sortModelPropertiesByRequiredFlag = Boolean.TRUE; - sortParamsByRequiredFlag = Boolean.TRUE; + // this must be false for parameter numbers to stay the same as the ones in the spec + // if another schema $refs a schema in a parameter, the json path + // and generated moudel must have the same parameter index as the spec + sortParamsByRequiredFlag = Boolean.FALSE; addSuffixToDuplicateOperationNicknames = false; modifyFeatureSet(features -> features 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 6ea9e35131c..d28458fead4 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 @@ -135,26 +135,6 @@ import unit_test_api Please follow the [installation procedure](#installation--usage) and then run the following: -```python - -import time -import unit_test_api -from pprint import pprint -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from unit_test_api.model.ref_in_allof import RefInAllof -from unit_test_api.model.ref_in_anyof import RefInAnyof -from unit_test_api.model.ref_in_items import RefInItems -from unit_test_api.model.ref_in_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 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - ```python import unit_test_api from unit_test_api.apis.tags import ref_api @@ -180,7 +160,6 @@ with unit_test_api.ApiClient(configuration) as api_client: except unit_test_api.ApiException as e: print("Exception when calling RefApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` -``` ## Documentation for API Endpoints diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md index 8692309f638..da56bb8f242 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md @@ -135,19 +135,6 @@ import this_package Please follow the [installation procedure](#installation--usage) and then run the following: -```python - -import time -import this_package -from pprint import pprint -from this_package.apis.tags import default_api -from this_package.model.operator import Operator -# Defining the host is optional and defaults to http://localhost:3000 -# See configuration.py for a list of all supported configuration parameters. -configuration = this_package.Configuration( - host = "http://localhost:3000" -) - ```python import this_package from this_package.apis.tags import default_api @@ -177,7 +164,6 @@ with this_package.ApiClient(configuration) as api_client: except this_package.ApiException as e: print("Exception when calling DefaultApi->post_operators: %s\n" % e) ``` -``` ## Documentation for API Endpoints 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 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 66bf2add7c6..700ec6e0f1e 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 @@ -28,11 +28,6 @@ from .. import path from . import response_for_200 from . import request_body -from . import parameter_9 -from . import parameter_10 -from . import parameter_11 -from . import parameter_12 -from . import parameter_13 from . import parameter_0 from . import parameter_1 from . import parameter_2 @@ -42,6 +37,11 @@ from . import parameter_6 from . import parameter_7 from . import parameter_8 +from . import parameter_9 +from . import parameter_10 +from . import parameter_11 +from . import parameter_12 +from . import parameter_13 from . import parameter_14 from . import parameter_15 from . import parameter_16 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 1509319ffa4..a45453c8cbe 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 @@ -27,11 +27,6 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import request_body -from . import parameter_9 -from . import parameter_10 -from . import parameter_11 -from . import parameter_12 -from . import parameter_13 from . import parameter_0 from . import parameter_1 from . import parameter_2 @@ -41,6 +36,11 @@ from . import parameter_5 from . import parameter_6 from . import parameter_7 from . import parameter_8 +from . import parameter_9 +from . import parameter_10 +from . import parameter_11 +from . import parameter_12 +from . import parameter_13 from . import parameter_14 from . import parameter_15 from . import parameter_16 diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py index 4a94857a42e..9269b212128 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py @@ -28,9 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.PathParameter( +parameter_oapg = api_client.QueryParameter( name="1", - style=api_client.ParameterStyle.SIMPLE, + style=api_client.ParameterStyle.FORM, schema=schema, - required=True, + explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py index 21be71ad794..fba4d5802ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py @@ -28,9 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.PathParameter( +parameter_oapg = api_client.QueryParameter( name="aB", - style=api_client.ParameterStyle.SIMPLE, + style=api_client.ParameterStyle.FORM, schema=schema, - required=True, + explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py index 864fbf20697..21be71ad794 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py @@ -28,8 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.HeaderParameter( - name="1", +parameter_oapg = api_client.PathParameter( + name="aB", style=api_client.ParameterStyle.SIMPLE, schema=schema, + required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py index 31bcdea5576..b6234e65d04 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py @@ -28,8 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.HeaderParameter( - name="aB", +parameter_oapg = api_client.PathParameter( + name="Ab", style=api_client.ParameterStyle.SIMPLE, schema=schema, + required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py index 98cf429af66..3d4d0e4cdb5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py @@ -28,8 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.HeaderParameter( +parameter_oapg = api_client.PathParameter( name="self", style=api_client.ParameterStyle.SIMPLE, schema=schema, + required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py index 037663edb72..2e7e164fb3b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py @@ -28,8 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.HeaderParameter( +parameter_oapg = api_client.PathParameter( name="A-B", style=api_client.ParameterStyle.SIMPLE, schema=schema, + required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py index b6234e65d04..8ffbc18bf6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py @@ -28,9 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.PathParameter( +parameter_oapg = api_client.QueryParameter( name="Ab", - style=api_client.ParameterStyle.SIMPLE, + style=api_client.ParameterStyle.FORM, schema=schema, - required=True, + explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py index 3d4d0e4cdb5..811565caf05 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py @@ -28,9 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.PathParameter( +parameter_oapg = api_client.QueryParameter( name="self", - style=api_client.ParameterStyle.SIMPLE, + style=api_client.ParameterStyle.FORM, schema=schema, - required=True, + explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py index 2e7e164fb3b..73a475d20de 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py @@ -28,9 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.PathParameter( +parameter_oapg = api_client.QueryParameter( name="A-B", - style=api_client.ParameterStyle.SIMPLE, + style=api_client.ParameterStyle.FORM, schema=schema, - required=True, + explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py index 9269b212128..864fbf20697 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py @@ -28,9 +28,8 @@ schema = schemas.StrSchema -parameter_oapg = api_client.QueryParameter( +parameter_oapg = api_client.HeaderParameter( name="1", - style=api_client.ParameterStyle.FORM, + style=api_client.ParameterStyle.SIMPLE, schema=schema, - explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py index fba4d5802ba..31bcdea5576 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py @@ -28,9 +28,8 @@ schema = schemas.StrSchema -parameter_oapg = api_client.QueryParameter( +parameter_oapg = api_client.HeaderParameter( name="aB", - style=api_client.ParameterStyle.FORM, + style=api_client.ParameterStyle.SIMPLE, schema=schema, - explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py index 8ffbc18bf6e..98cf429af66 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py @@ -28,9 +28,8 @@ schema = schemas.StrSchema -parameter_oapg = api_client.QueryParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, +parameter_oapg = api_client.HeaderParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, schema=schema, - explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py index 811565caf05..037663edb72 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py @@ -28,9 +28,8 @@ schema = schemas.StrSchema -parameter_oapg = api_client.QueryParameter( - name="self", - style=api_client.ParameterStyle.FORM, +parameter_oapg = api_client.HeaderParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, schema=schema, - explode=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py index 73a475d20de..4a94857a42e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py @@ -28,9 +28,9 @@ schema = schemas.StrSchema -parameter_oapg = api_client.QueryParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, +parameter_oapg = api_client.PathParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, schema=schema, - explode=True, + required=True, ), 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 c4b6fb968b9..2611e1ee624 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 @@ -27,8 +27,8 @@ from .. import path from . import response_for_400 -from . import parameter_1 from . import parameter_0 +from . import parameter_1 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 a3badb59e12..4f8d4bf80d0 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 @@ -26,8 +26,8 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_400 -from . import parameter_1 from . import parameter_0 +from . import parameter_1 diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py index 236cf812790..6d45e4883ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py @@ -25,12 +25,11 @@ from petstore_api import schemas # noqa: F401 -schema = schemas.Int64Schema +schema = schemas.StrSchema -parameter_oapg = api_client.PathParameter( - name="petId", +parameter_oapg = api_client.HeaderParameter( + name="api_key", style=api_client.ParameterStyle.SIMPLE, schema=schema, - required=True, ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py index 6d45e4883ff..236cf812790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py @@ -25,11 +25,12 @@ from petstore_api import schemas # noqa: F401 -schema = schemas.StrSchema +schema = schemas.Int64Schema -parameter_oapg = api_client.HeaderParameter( - name="api_key", +parameter_oapg = api_client.PathParameter( + name="petId", style=api_client.ParameterStyle.SIMPLE, schema=schema, + required=True, ), From 861ab182ebc0c948dbcb6220f4c8b43244868da7 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 17:22:18 -0700 Subject: [PATCH 10/23] Fixes java docstirng typo --- .../org/openapitools/codegen/languages/PythonClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 555bd4fed9b..3f3cf0fa704 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 @@ -115,7 +115,7 @@ public PythonClientCodegen() { sortModelPropertiesByRequiredFlag = Boolean.TRUE; // this must be false for parameter numbers to stay the same as the ones in the spec // if another schema $refs a schema in a parameter, the json path - // and generated moudel must have the same parameter index as the spec + // and generated module must have the same parameter index as the spec sortParamsByRequiredFlag = Boolean.FALSE; addSuffixToDuplicateOperationNicknames = false; From 37afbc63e2ae15ecb90c2e69488f169fd15fc8df Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 18:10:48 -0700 Subject: [PATCH 11/23] Fixes JavaModelTest tests --- .../java/org/openapitools/codegen/java/JavaModelTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java index 45189c9de52..50d0679986f 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java @@ -471,8 +471,8 @@ public void arrayModelWithItemNameTest() { Assert.assertTrue(property.isContainer); final CodegenProperty itemsProperty = property.items; - Assert.assertEquals(itemsProperty.baseName, "child"); - Assert.assertEquals(itemsProperty.name, "child"); + Assert.assertEquals(itemsProperty.baseName, "items"); + Assert.assertEquals(itemsProperty.name, "items"); } @Test(description = "convert an array model") @@ -978,7 +978,7 @@ public void modelWithWrappedXmlTest() { Assert.assertNotNull(property2.items); CodegenProperty items = property2.items; Assert.assertEquals(items.xmlName, "i"); - Assert.assertEquals(items.baseName, "array"); + Assert.assertEquals(items.baseName, "items"); } @Test(description = "convert a boolean parameter") From 5a11857de5f210d655d94c1dbeca5b559c1e9132 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 18:14:27 -0700 Subject: [PATCH 12/23] Fixes tests in JavaModelEnumTest --- .../codegen/java/JavaModelEnumTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelEnumTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelEnumTest.java index 1f3f48e8a61..238d22688ab 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelEnumTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelEnumTest.java @@ -73,16 +73,16 @@ public void converterInArrayTest() { final CodegenProperty enumVar = cm.vars.get(0); Assert.assertEquals(enumVar.baseName, "name"); Assert.assertEquals(enumVar.dataType, "List"); - Assert.assertEquals(enumVar.datatypeWithEnum, "List"); + Assert.assertEquals(enumVar.datatypeWithEnum, "List"); Assert.assertEquals(enumVar.name, "name"); Assert.assertEquals(enumVar.defaultValue, "new ArrayList<>()"); Assert.assertEquals(enumVar.baseType, "List"); Assert.assertTrue(enumVar.isEnum); - Assert.assertEquals(enumVar.mostInnerItems.baseName, "name"); + Assert.assertEquals(enumVar.mostInnerItems.baseName, "items"); Assert.assertEquals(enumVar.mostInnerItems.dataType, "String"); - Assert.assertEquals(enumVar.mostInnerItems.datatypeWithEnum, "NameEnum"); - Assert.assertEquals(enumVar.mostInnerItems.name, "name"); + Assert.assertEquals(enumVar.mostInnerItems.datatypeWithEnum, "ItemsEnum"); + Assert.assertEquals(enumVar.mostInnerItems.name, "items"); Assert.assertNull(enumVar.mostInnerItems.defaultValue); Assert.assertEquals(enumVar.mostInnerItems.baseType, "String"); @@ -106,16 +106,16 @@ public void converterInArrayInArrayTest() { final CodegenProperty enumVar = cm.vars.get(0); Assert.assertEquals(enumVar.baseName, "name"); Assert.assertEquals(enumVar.dataType, "List>"); - Assert.assertEquals(enumVar.datatypeWithEnum, "List>"); + Assert.assertEquals(enumVar.datatypeWithEnum, "List>"); Assert.assertEquals(enumVar.name, "name"); Assert.assertEquals(enumVar.defaultValue, "new ArrayList<>()"); Assert.assertEquals(enumVar.baseType, "List"); Assert.assertTrue(enumVar.isEnum); - Assert.assertEquals(enumVar.mostInnerItems.baseName, "name"); + Assert.assertEquals(enumVar.mostInnerItems.baseName, "items"); Assert.assertEquals(enumVar.mostInnerItems.dataType, "String"); - Assert.assertEquals(enumVar.mostInnerItems.datatypeWithEnum, "NameEnum"); - Assert.assertEquals(enumVar.mostInnerItems.name, "name"); + Assert.assertEquals(enumVar.mostInnerItems.datatypeWithEnum, "ItemsEnum"); + Assert.assertEquals(enumVar.mostInnerItems.name, "items"); Assert.assertNull(enumVar.mostInnerItems.defaultValue); Assert.assertEquals(enumVar.mostInnerItems.baseType, "String"); From 43afdfa9ab8faeb01b178d0a56266a87b4b95cd6 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 18:56:21 -0700 Subject: [PATCH 13/23] FIxes tests in JavaClientCodegenTest --- .../codegen/java/JavaClientCodegenTest.java | 107 ------------------ 1 file changed, 107 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index e4b4fc94da6..27c9f62b73c 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -240,17 +240,6 @@ public void testPackageNamesSetInvokerDerivedFromModel() { Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm"); } - @Test - public void testGetSchemaTypeWithComposedSchemaWithAllOf() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/composed-allof.yaml"); - final JavaClientCodegen codegen = new JavaClientCodegen(); - - Operation operation = openAPI.getPaths().get("/ping").getPost(); - CodegenOperation co = codegen.fromOperation("/ping", "POST", operation, null); - Assert.assertEquals(co.allParams.size(), 1); - Assert.assertEquals(co.allParams.get(0).baseType, "MessageEventCoreWithTimeListEntries"); - } - @Test public void updateCodegenPropertyEnum() { final JavaClientCodegen codegen = new JavaClientCodegen(); @@ -1125,37 +1114,6 @@ private Optional getByCriteria(List codegenO .findFirst(); } - @Test - public void testCustomMethodParamsAreCamelizedWhenUsingFeign() throws IOException { - - File output = Files.createTempDirectory("test").toFile(); - - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.FEIGN) - .setInputSpec("src/test/resources/3_0/issue_7791.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(clientOptInput).generate(); - - TestUtils.ensureContainsFile(files, output, "src/main/java/org/openapitools/client/api/DefaultApi.java"); - - validateJavaSourceFiles(files); - - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "@RequestLine(\"POST /events/{eventId}:undelete\")"); - TestUtils.assertFileNotContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "event_id"); - - // baseName is kept for form parameters - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "@Param(\"some_file\") File someFile"); - - output.deleteOnExit(); - } - /** * See https://github.com/OpenAPITools/openapi-generator/issues/6715 * @@ -1291,39 +1249,6 @@ public void testNativeClientWhiteSpacePathParamEncoding() throws IOException { "public static String urlEncode(String s) { return URLEncoder.encode(s, UTF_8).replaceAll(\"\\\\+\", \"%20\"); }"); } - /** - * See https://github.com/OpenAPITools/openapi-generator/issues/4808 - */ - @Test - public void testNativeClientExplodedQueryParamObject() throws IOException { - Map properties = new HashMap<>(); - properties.put(CodegenConstants.API_PACKAGE, "xyz.abcdef.api"); - - File output = Files.createTempDirectory("test").toFile(); - output.deleteOnExit(); - - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.NATIVE) - .setAdditionalProperties(properties) - .setInputSpec("src/test/resources/3_0/issue4808.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(clientOptInput).generate(); - - Assert.assertEquals(files.size(), 38); - validateJavaSourceFiles(files); - - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"since\", queryObject.getSince()));", - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"sinceBuild\", queryObject.getSinceBuild()));", - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxBuilds\", queryObject.getMaxBuilds()));", - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxWaitSecs\", queryObject.getMaxWaitSecs()));" - ); - } - @Test public void testExtraAnnotationsNative() throws IOException { testExtraAnnotations(JavaClientCodegen.NATIVE); @@ -1633,36 +1558,4 @@ public void testExtraAnnotations(String library) throws IOException { TestUtils.assertExtraAnnotationFiles(outputPath + "/src/main/java/org/openapitools/client/model"); } - - /** - * See https://github.com/OpenAPITools/openapi-generator/issues/11340 - */ - @Test - public void testReferencedHeader2() throws Exception { - File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - output.deleteOnExit(); - Map additionalProperties = new HashMap<>(); - additionalProperties.put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); - final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("java") - .setAdditionalProperties(additionalProperties) - .setInputSpec("src/test/resources/3_0/issue-11340.yaml") - .setOutputDir(output.getAbsolutePath() - .replace("\\", "/")); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - - Map files = generator.opts(clientOptInput).generate().stream() - .collect(Collectors.toMap(File::getName, Function.identity())); - - JavaFileAssert.assertThat(files.get("DefaultApi.java")) - .assertMethod("operationWithHttpInfo") - .hasParameter("requestBody") - .assertParameterAnnotations() - .containsWithName("NotNull") - .toParameter().toMethod() - .hasParameter("xNonNullHeaderParameter") - .assertParameterAnnotations() - .containsWithName("NotNull"); - } } From f29edc155bbc55de7ed4db8eddc9f5e0664e1f5d Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 18:59:44 -0700 Subject: [PATCH 14/23] FIxes tests in DefaultGeneratorTest --- .../java/org/openapitools/codegen/DefaultGeneratorTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java index 778d1d889bb..587f045580d 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java @@ -331,9 +331,6 @@ public void supportCustomTemplateEngine() throws IOException { Assert.assertTrue(new File(output, ".openapi-generator/FILES").exists()); TestUtils.assertFileContains(java.nio.file.Paths.get(output + "/PingApi.jmx"), "PingApi Test Plan via Handlebars"); - TestUtils.assertFileContains(java.nio.file.Paths.get(output + "/PingApi.csv"), - "testCase,httpStatusCode,someObj", - "Success,200,0"); } finally { output.delete(); } From 2e6e8e5c2537d17e8de84f6165ef516316e899f9 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 19:06:51 -0700 Subject: [PATCH 15/23] FIxes tests in DefaultCodegenTest --- .../codegen/DefaultCodegenTest.java | 46 ++----------------- 1 file changed, 5 insertions(+), 41 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 33eacd135ca..e731f054f34 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 @@ -584,42 +584,6 @@ public void testEnsureNoDuplicateProduces() { Assert.assertEquals(co.produces.get(0).get("mediaType"), "application/json"); } - @Test - public void testConsistentParameterNameAfterUniquenessRename() throws Exception { - OpenAPI openAPI = TestUtils.createOpenAPI(); - Operation operation = new Operation() - .operationId("opId") - .addParametersItem(new QueryParameter().name("myparam").schema(new StringSchema())) - .addParametersItem(new QueryParameter().name("myparam").schema(new StringSchema())) - .responses(new ApiResponses().addApiResponse("200", new ApiResponse().description("OK"))); - - DefaultCodegen codegen = new DefaultCodegen(); - codegen.setOpenAPI(openAPI); - CodegenOperation co = codegen.fromOperation("/some/path", "get", operation, null); - Assert.assertEquals(co.path, "/some/path"); - Assert.assertEquals(co.allParams.size(), 2); - List allParamsNames = co.allParams.stream().map(p -> p.paramName).collect(Collectors.toList()); - Assert.assertTrue(allParamsNames.contains("myparam")); - Assert.assertTrue(allParamsNames.contains("myparam2")); - List queryParamsNames = co.queryParams.stream().map(p -> p.paramName).collect(Collectors.toList()); - Assert.assertTrue(queryParamsNames.contains("myparam")); - Assert.assertTrue(queryParamsNames.contains("myparam2")); - } - - @Test - public void testUniquenessRenameOfFormParameters() throws Exception { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/form-duplicated-parameter.yaml"); - DefaultCodegen codegen = new DefaultCodegen(); - codegen.setOpenAPI(openAPI); - Operation operation = openAPI.getPaths().get("/form-param-poc/{id}").getPut(); - CodegenOperation co = codegen.fromOperation("/form-param-poc/{id}", "put", operation, null); - Assert.assertEquals(co.path, "/form-param-poc/{id}"); - Assert.assertEquals(co.allParams.size(), 2); - List allParamsNames = co.allParams.stream().map(p -> p.paramName).collect(Collectors.toList()); - Assert.assertTrue(allParamsNames.contains("id")); - Assert.assertTrue(allParamsNames.contains("id2")); - } - @Test public void testGetSchemaTypeWithComposedSchemaWithOneOf() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/composed-oneof.yaml"); @@ -4034,7 +3998,7 @@ public void testRequestParameterContent() { assertTrue(cp.isMap); assertTrue(cp.isModel); assertEquals(cp.complexType, "object"); - assertEquals(cp.baseName, "coordinatesInlineSchema"); + assertEquals(cp.baseName, "schema"); CodegenParameter coordinatesReferencedSchema = co.queryParams.get(1); content = coordinatesReferencedSchema.getContent(); @@ -4043,7 +4007,7 @@ public void testRequestParameterContent() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "coordinatesReferencedSchema"); + assertEquals(cp.baseName, "schema"); } @Test @@ -4147,7 +4111,7 @@ public void testResponseContentAndHeader() { assertEquals(content.keySet(), new HashSet<>(Arrays.asList("application/json"))); CodegenParameter schemaParam = co.queryParams.get(2); - assertEquals(schemaParam.getSchema().baseName, "stringWithMinLength"); + assertEquals(schemaParam.getSchema().baseName, "schema"); CodegenResponse cr = co.responses.get(0); @@ -4156,12 +4120,12 @@ public void testResponseContentAndHeader() { CodegenParameter header1 = responseHeaders.get(0); assertEquals("X-Rate-Limit", header1.baseName); assertTrue(header1.isUnboundedInteger); - assertEquals(header1.getSchema().baseName, "X-Rate-Limit"); + assertEquals(header1.getSchema().baseName, "schema"); CodegenParameter header2 = responseHeaders.get(1); assertEquals("X-Rate-Limit-Ref", header2.baseName); assertTrue(header2.isUnboundedInteger); - assertEquals(header2.getSchema().baseName, "X-Rate-Limit-Ref"); + assertEquals(header2.getSchema().baseName, "schema"); content = cr.getContent(); assertEquals(content.keySet(), new HashSet<>(Arrays.asList("application/json", "text/plain"))); From a677d8ebbf3c682fa3db3e1a0774393063d52d27 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 22:58:08 -0700 Subject: [PATCH 16/23] Adds HeaderParameterWithoutName to api_client --- .../resources/python/api_client.handlebars | 67 ++++++++++++++----- 1 file changed, 51 insertions(+), 16 deletions(-) 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 cfb0694b80b..921d2fb1ff0 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 @@ -341,7 +341,6 @@ class JSONDetector: @dataclasses.dataclass class ParameterBase(JSONDetector): - name: str in_type: ParameterInType required: bool style: typing.Optional[ParameterStyle] @@ -365,7 +364,6 @@ class ParameterBase(JSONDetector): ParameterInType.HEADER: ParameterStyle.SIMPLE, ParameterInType.COOKIE: ParameterStyle.FORM, } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() @classmethod @@ -382,7 +380,6 @@ class ParameterBase(JSONDetector): def __init__( self, - name: str, in_type: ParameterInType, required: bool = False, style: typing.Optional[ParameterStyle] = None, @@ -395,15 +392,12 @@ class ParameterBase(JSONDetector): raise ValueError('Value missing; Pass in either schema or content') if schema and content: raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.__verify_style_to_in_type(style, in_type) if content is None and style is None: style = self.__in_type_to_default_style[in_type] if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: raise ValueError('Invalid content length, content length must equal 1') self.in_type = in_type - self.name = name self.required = required self.style = style self.explode = explode @@ -422,6 +416,7 @@ class ParameterBase(JSONDetector): class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str def __init__( self, @@ -433,8 +428,8 @@ class PathParameter(ParameterBase, StyleSimpleSerializer): schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): + self.name = name super().__init__( - name, in_type=ParameterInType.PATH, required=required, style=style, @@ -519,6 +514,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer): class QueryParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -533,8 +529,8 @@ class QueryParameter(ParameterBase, StyleFormSerializer): used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.QUERY, required=required, style=used_style, @@ -646,6 +642,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer): class CookieParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -660,8 +657,8 @@ class CookieParameter(ParameterBase, StyleFormSerializer): used_style = ParameterStyle.FORM if style is None and content is None and schema else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.COOKIE, required=required, style=used_style, @@ -706,10 +703,10 @@ class CookieParameter(ParameterBase, StyleFormSerializer): raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) -class HeaderParameter(ParameterBase, StyleSimpleSerializer): +class HeaderParameterWithoutName(ParameterBase, StyleSimpleSerializer): + def __init__( self, - name: str, required: bool = False, style: typing.Optional[ParameterStyle] = None, explode: bool = False, @@ -718,7 +715,6 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): super().__init__( - name, in_type=ParameterInType.HEADER, required=required, style=style, @@ -740,7 +736,8 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + name: str ) -> HTTPHeaderDict: if self.schema: cast_in_data = self.schema(in_data) @@ -751,18 +748,56 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): returns headers: dict """ if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) + value = self._serialize_simple(cast_in_data, name, self.explode, False) + return self.__to_headers(((name, value),)) # self.content will be length one for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) + return self.__to_headers(((name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) +class HeaderParameter(HeaderParameterWithoutName): + name: str + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.name = name + super().__init__( + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> HTTPHeaderDict: + return super().serialize( + in_data, + self.name + ) + + class Encoding: def __init__( self, From a7e5301bbd15cffe22f46f2e664848b24bdc1035 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 23:06:20 -0700 Subject: [PATCH 17/23] Sample regenerated, responses are now modules --- .../languages/PythonClientCodegen.java | 7 +- .../python/.openapi-generator/VERSION | 2 +- .../python/petstore_api/api_client.py | 67 +++++-- .../patch/response_for_200/__init__.py | 43 ++++ .../fake/delete/response_for_200/__init__.py | 28 +++ .../fake/get/response_for_200/__init__.py | 28 +++ .../fake/get/response_for_404/__init__.py | 28 +++ .../fake/patch/response_for_200/__init__.py | 43 ++++ .../fake/post/response_for_200/__init__.py | 28 +++ .../fake/post/response_for_404/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 43 ++++ .../put/response_for_200/__init__.py | 28 +++ .../put/response_for_200/__init__.py | 28 +++ .../put/response_for_200/__init__.py | 28 +++ .../patch/response_for_200/__init__.py | 43 ++++ .../delete/response_for_200/__init__.py | 28 +++ .../delete/response_for_default/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 28 +++ .../post/response_for_200/__init__.py | 183 ++++++++++++++++++ .../get/response_for_200/__init__.py | 28 +++ .../patch/response_for_200/__init__.py | 28 +++ .../post/response_for_200/__init__.py | 41 ++++ .../get/response_for_200/__init__.py | 28 +++ .../post/response_for_200/__init__.py | 41 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../get/response_for_200/__init__.py | 41 ++++ .../get/response_for_200/__init__.py | 28 +++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../get/response_for_200/__init__.py | 42 ++++ .../put/response_for_200/__init__.py | 28 +++ .../post/response_for_200/__init__.py | 41 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../post/response_for_200/__init__.py | 43 ++++ .../foo/get/response_for_default/__init__.py | 95 +++++++++ .../pet/post/response_for_200/__init__.py | 28 +++ .../pet/post/response_for_405/__init__.py | 28 +++ .../pet/put/response_for_400/__init__.py | 28 +++ .../pet/put/response_for_404/__init__.py | 28 +++ .../pet/put/response_for_405/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 98 ++++++++++ .../get/response_for_400/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 98 ++++++++++ .../get/response_for_400/__init__.py | 28 +++ .../delete/response_for_400/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 48 +++++ .../get/response_for_400/__init__.py | 28 +++ .../get/response_for_404/__init__.py | 28 +++ .../post/response_for_405/__init__.py | 28 +++ .../post/response_for_200/__init__.py | 43 ++++ .../get/response_for_200/__init__.py | 69 +++++++ .../post/response_for_200/__init__.py | 48 +++++ .../post/response_for_400/__init__.py | 28 +++ .../delete/response_for_400/__init__.py | 28 +++ .../delete/response_for_404/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 48 +++++ .../get/response_for_400/__init__.py | 28 +++ .../get/response_for_404/__init__.py | 28 +++ .../post/response_for_default/__init__.py | 28 +++ .../post/response_for_default/__init__.py | 28 +++ .../post/response_for_default/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 72 +++++++ .../get/response_for_400/__init__.py | 28 +++ .../get/response_for_default/__init__.py | 28 +++ .../delete/response_for_200/__init__.py | 28 +++ .../delete/response_for_404/__init__.py | 28 +++ .../get/response_for_200/__init__.py | 48 +++++ .../get/response_for_400/__init__.py | 28 +++ .../get/response_for_404/__init__.py | 28 +++ .../put/response_for_400/__init__.py | 28 +++ .../put/response_for_404/__init__.py | 28 +++ 79 files changed, 3048 insertions(+), 19 deletions(-) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200/__init__.py 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/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404/__init__.py 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 3f3cf0fa704..b485474d942 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 @@ -591,6 +591,7 @@ protected void generateEndpoints(OperationsMap objs) { outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, "request_body.py")); pathsFiles.add(Arrays.asList(paramMap, "endpoint_request_body.handlebars", outputFilename)); } + // paths.some_path.post.parameter_0.py Integer i = 0; for (CodegenParameter cp: co.allParams) { Map paramMap = new HashMap<>(); @@ -604,7 +605,9 @@ protected void generateEndpoints(OperationsMap objs) { } for (CodegenResponse response: co.responses) { - // paths.some_path.post.response_for_200.py (file per response) + // paths.some_path.post.response_for_200.__init__.py (file per response) + // response is a package because responses have Headers which can be refed + // so each inline header should be a module in the response package Map responseMap = new HashMap<>(); responseMap.put("response", response); responseMap.put("packageName", packageName); @@ -614,7 +617,7 @@ protected void generateEndpoints(OperationsMap objs) { } else { responseModuleName += response.code; } - String responseFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName+ ".py")); + String responseFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName, "__init__.py")); pathsFiles.add(Arrays.asList(responseMap, "endpoint_response.handlebars", responseFilename)); } /* 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/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index ace72897b46..fe3a2815482 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -345,7 +345,6 @@ def _content_type_is_json(cls, content_type: str) -> bool: @dataclasses.dataclass class ParameterBase(JSONDetector): - name: str in_type: ParameterInType required: bool style: typing.Optional[ParameterStyle] @@ -369,7 +368,6 @@ class ParameterBase(JSONDetector): ParameterInType.HEADER: ParameterStyle.SIMPLE, ParameterInType.COOKIE: ParameterStyle.FORM, } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() @classmethod @@ -386,7 +384,6 @@ def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_ty def __init__( self, - name: str, in_type: ParameterInType, required: bool = False, style: typing.Optional[ParameterStyle] = None, @@ -399,15 +396,12 @@ def __init__( raise ValueError('Value missing; Pass in either schema or content') if schema and content: raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.__verify_style_to_in_type(style, in_type) if content is None and style is None: style = self.__in_type_to_default_style[in_type] if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: raise ValueError('Invalid content length, content length must equal 1') self.in_type = in_type - self.name = name self.required = required self.style = style self.explode = explode @@ -426,6 +420,7 @@ def _serialize_json( class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str def __init__( self, @@ -437,8 +432,8 @@ def __init__( schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): + self.name = name super().__init__( - name, in_type=ParameterInType.PATH, required=required, style=style, @@ -523,6 +518,7 @@ def serialize( class QueryParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -537,8 +533,8 @@ def __init__( used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.QUERY, required=required, style=used_style, @@ -650,6 +646,7 @@ def serialize( class CookieParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -664,8 +661,8 @@ def __init__( used_style = ParameterStyle.FORM if style is None and content is None and schema else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.COOKIE, required=required, style=used_style, @@ -710,10 +707,10 @@ def serialize( raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) -class HeaderParameter(ParameterBase, StyleSimpleSerializer): +class HeaderParameterWithoutName(ParameterBase, StyleSimpleSerializer): + def __init__( self, - name: str, required: bool = False, style: typing.Optional[ParameterStyle] = None, explode: bool = False, @@ -722,7 +719,6 @@ def __init__( content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): super().__init__( - name, in_type=ParameterInType.HEADER, required=required, style=style, @@ -744,7 +740,8 @@ def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHead def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + name: str ) -> HTTPHeaderDict: if self.schema: cast_in_data = self.schema(in_data) @@ -755,18 +752,56 @@ def serialize( returns headers: dict """ if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) + value = self._serialize_simple(cast_in_data, name, self.explode, False) + return self.__to_headers(((name, value),)) # self.content will be length one for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) + return self.__to_headers(((name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) +class HeaderParameter(HeaderParameterWithoutName): + name: str + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.name = name + super().__init__( + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> HTTPHeaderDict: + return super().serialize( + in_data, + self.name + ) + + class Encoding: def __init__( self, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200/__init__.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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py new file mode 100644 index 00000000000..d54e97d5447 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.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/__init__.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/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.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/__init__.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/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py new file mode 100644 index 00000000000..d403500ea4a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405/__init__.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_400/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400/__init__.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/__init__.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/response_for_400/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400/__init__.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/__init__.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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404/__init__.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/__init__.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/response_for_405/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400/__init__.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/__init__.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_400/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404/__init__.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/__init__.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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404/__init__.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/__init__.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/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default/__init__.py new file mode 100644 index 00000000000..7ec95a8627a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default/__init__.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/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default/__init__.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/__init__.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/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py new file mode 100644 index 00000000000..31da14238fe --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py @@ -0,0 +1,72 @@ +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: + RequiredParams = typing_extensions.TypedDict( + 'RequiredParams', + { + } + ) + OptionalParams = typing_extensions.TypedDict( + 'OptionalParams', + { + 'X-Rate-Limit': typing.Union[x_rate_limit.schema, decimal.Decimal, int, ], + 'X-Expires-After': typing.Union[x_expires_after.schema, str, datetime, ], + }, + total=False + ) + + + class Params(RequiredParams, OptionalParams): + pass + + + parameters = [ + x_rate_limit.parameter_oapg, + x_expires_after.parameter_oapg, + ] + +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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400/__init__.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/__init__.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/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default/__init__.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/__init__.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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404/__init__.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/__init__.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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404/__init__.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/__init__.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_400/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400/__init__.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/__init__.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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404/__init__.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/__init__.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, +) From 19fcbd85cff36409dafd2c45350d9efc4576fe5c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 18 Oct 2022 23:14:40 -0700 Subject: [PATCH 18/23] Moves request body schemas to the root indentation level of the response modules --- .../python/endpoint_response.handlebars | 20 +- .../patch/response_for_200/__init__.py | 10 +- .../fake/patch/response_for_200/__init__.py | 10 +- .../get/response_for_200/__init__.py | 10 +- .../patch/response_for_200/__init__.py | 10 +- .../get/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 260 +++++++++--------- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../get/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../get/response_for_200/__init__.py | 4 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../post/response_for_200/__init__.py | 10 +- .../foo/get/response_for_default/__init__.py | 102 ++++--- .../get/response_for_200/__init__.py | 112 ++++---- .../get/response_for_200/__init__.py | 112 ++++---- .../get/response_for_200/__init__.py | 16 +- .../post/response_for_200/__init__.py | 10 +- .../get/response_for_200/__init__.py | 60 ++-- .../post/response_for_200/__init__.py | 16 +- .../get/response_for_200/__init__.py | 16 +- .../get/response_for_200/__init__.py | 16 +- .../get/response_for_200/__init__.py | 16 +- 34 files changed, 451 insertions(+), 519 deletions(-) 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 index 16521863824..af595ab0ccb 100644 --- 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 @@ -11,14 +11,12 @@ from {{packageName}} import api_client {{#if getContent}} -class BodySchemas: - # body schemas - {{#each content}} - {{#with this.schema}} - {{> model_templates/schema }} - {{/with}} - {{/each}} - pass +# body schemas +{{#each content}} + {{#with this.schema}} +{{> model_templates/schema }} + {{/with}} +{{/each}} {{/if}} @@ -30,7 +28,7 @@ class ApiResponse(api_client.ApiResponse): {{#each content}} {{#if this.schema}} {{#with this.schema}} - BodySchemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + {{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{/with}} {{else}} schemas.Unset, @@ -48,7 +46,7 @@ class ApiResponse(api_client.ApiResponse): {{#each content}} {{#if this.schema}} {{#with this.schema}} - BodySchemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + {{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{/with}} {{else}} schemas.Unset, @@ -76,7 +74,7 @@ response = api_client.OpenApiResponse( '{{{@key}}}': api_client.MediaType( {{#if this.schema}} {{#with this.schema}} - schema=BodySchemas.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, + schema={{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}, {{/with}} {{/if}} ), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py index d54e97d5447..9a784934a3f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.client import Client -class BodySchemas: - # body schemas - application_json = Client - pass +# body schemas +application_json = Client @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py index d54e97d5447..9a784934a3f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.client import Client -class BodySchemas: - # body schemas - application_json = Client - pass +# body schemas +application_json = Client @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py index e7869c57801..b8186c509ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -class BodySchemas: - # body schemas - application_json = AdditionalPropertiesWithArrayOfEnums - pass +# body schemas +application_json = AdditionalPropertiesWithArrayOfEnums @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py index d54e97d5447..9a784934a3f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.client import Client -class BodySchemas: - # body schemas - application_json = Client - pass +# body schemas +application_json = Client @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py index bb59ed13e40..356474e1849 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.health_check_result import HealthCheckResult -class BodySchemas: - # body schemas - application_json = HealthCheckResult - pass +# body schemas +application_json = HealthCheckResult @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py index 73ccd674578..29476bfdf47 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py @@ -16,156 +16,154 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - - - class application_json( - schemas.ComposedSchema, - ): - - - class MetaOapg: +# 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 all_of_0( - schemas.StrSchema + class someProp( + schemas.ComposedSchema, ): class MetaOapg: - min_length = 1 + + + 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, + ] - @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: ... - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[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, - ) + @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) - class multipart_form_data( - schemas.DictSchema - ): + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - 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) - + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def __new__( + 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: 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 + *args, + someProp=someProp, + _configuration=_configuration, + **kwargs, + ) @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, - BodySchemas.multipart_form_data, + application_json, + multipart_form_data, ] headers: schemas.Unset = schemas.unset @@ -174,10 +172,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), 'multipart/form-data': api_client.MediaType( - schema=BodySchemas.multipart_form_data, + schema=multipart_form_data, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py index 7c80211b70e..3e9adccf83a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py @@ -16,17 +16,15 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - application_json_charsetutf_8 = schemas.AnyTypeSchema - pass +# body schemas +application_json_charsetutf_8 = schemas.AnyTypeSchema @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json_charsetutf_8, + application_json_charsetutf_8, ] headers: schemas.Unset = schemas.unset @@ -35,7 +33,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json; charset=utf-8': api_client.MediaType( - schema=BodySchemas.application_json_charsetutf_8, + schema=application_json_charsetutf_8, ), }, ) 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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.py index 90561be6384..062d6dafa76 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.py @@ -16,17 +16,15 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - application_json = schemas.AnyTypeSchema - pass +# body schemas +application_json = schemas.AnyTypeSchema @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -35,7 +33,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py index 55c94e2ea12..88e145120d7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.api_response import ApiResponse -class BodySchemas: - # body schemas - application_json = ApiResponse - pass +# body schemas +application_json = ApiResponse @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py index 90561be6384..062d6dafa76 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py @@ -16,17 +16,15 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - application_json = schemas.AnyTypeSchema - pass +# body schemas +application_json = schemas.AnyTypeSchema @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -35,7 +33,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py index 8bdb51cf3e8..0d9f76ca6c5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.array_of_enums import ArrayOfEnums -class BodySchemas: - # body schemas - application_json = ArrayOfEnums - pass +# body schemas +application_json = ArrayOfEnums @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py index bfca2008375..72e07262531 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.animal_farm import AnimalFarm -class BodySchemas: - # body schemas - application_json = AnimalFarm - pass +# body schemas +application_json = AnimalFarm @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py index ec533ef13b8..c6139cbccb2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.boolean import Boolean -class BodySchemas: - # body schemas - application_json = Boolean - pass +# body schemas +application_json = Boolean @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py index fc2cae69019..7847d91ffdb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -class BodySchemas: - # body schemas - application_json = ComposedOneOfDifferentTypes - pass +# body schemas +application_json = ComposedOneOfDifferentTypes @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py index 65a3feee344..b6f1145f125 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.string_enum import StringEnum -class BodySchemas: - # body schemas - application_json = StringEnum - pass +# body schemas +application_json = StringEnum @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py index 2fd3e77ef58..7ca38bc3a98 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.mammal import Mammal -class BodySchemas: - # body schemas - application_json = Mammal - pass +# body schemas +application_json = Mammal @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py index 9d27aded28f..fecc0a98577 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.number_with_validations import NumberWithValidations -class BodySchemas: - # body schemas - application_json = NumberWithValidations - pass +# body schemas +application_json = NumberWithValidations @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py index 24c4fa41ff6..1eef55a3eb0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -class BodySchemas: - # body schemas - application_json = ObjectModelWithRefProps - pass +# body schemas +application_json = ObjectModelWithRefProps @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py index 084ff9dca08..96293b6b39e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.string import String -class BodySchemas: - # body schemas - application_json = String - pass +# body schemas +application_json = String @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py index e31f6c2fbbc..d461ee5680a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py @@ -16,9 +16,7 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - pass +# body schemas @dataclasses.dataclass diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py index d2427b782b5..7e6f643a28c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py @@ -16,17 +16,15 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - application_octet_stream = schemas.BinarySchema - pass +# body schemas +application_octet_stream = schemas.BinarySchema @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_octet_stream, + application_octet_stream, ] headers: schemas.Unset = schemas.unset @@ -35,7 +33,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/octet-stream': api_client.MediaType( - schema=BodySchemas.application_octet_stream, + schema=application_octet_stream, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py index 55c94e2ea12..88e145120d7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.api_response import ApiResponse -class BodySchemas: - # body schemas - application_json = ApiResponse - pass +# body schemas +application_json = ApiResponse @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py index 55c94e2ea12..88e145120d7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.api_response import ApiResponse -class BodySchemas: - # body schemas - application_json = ApiResponse - pass +# body schemas +application_json = ApiResponse @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py index d403500ea4a..c2f4f43b454 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py @@ -18,69 +18,67 @@ from petstore_api.model.foo import Foo -class BodySchemas: - # body schemas +# 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': ... - class application_json( - schemas.DictSchema - ): + @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) - 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__( + @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: 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 + *args, + string=string, + _configuration=_configuration, + **kwargs, + ) @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -89,7 +87,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py index 149afb6194c..0f1ca7b827e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py @@ -18,69 +18,67 @@ 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__( +# 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: 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__( + 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: 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 + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Pet': + return super().__getitem__(i) @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: schemas.Unset = schemas.unset @@ -89,10 +87,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py index 149afb6194c..0f1ca7b827e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py @@ -18,69 +18,67 @@ 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__( +# 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: 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__( + 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: 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 + arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Pet': + return super().__getitem__(i) @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: schemas.Unset = schemas.unset @@ -89,10 +87,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py index 632ed1944b6..9da36abc1c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py @@ -18,19 +18,17 @@ from petstore_api.model.pet import Pet -class BodySchemas: - # body schemas - application_xml = Pet - application_json = Pet - pass +# body schemas +application_xml = Pet +application_json = Pet @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: schemas.Unset = schemas.unset @@ -39,10 +37,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py index 55c94e2ea12..88e145120d7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py @@ -18,17 +18,15 @@ from petstore_api.model.api_response import ApiResponse -class BodySchemas: - # body schemas - application_json = ApiResponse - pass +# body schemas +application_json = ApiResponse @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +35,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py index 716aea63925..79e712f4770 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py @@ -16,45 +16,43 @@ from petstore_api import schemas # noqa: F401 -class BodySchemas: - # body schemas - - - class application_json( - schemas.DictSchema - ): - +# body schemas + + +class application_json( + schemas.DictSchema +): + + + class MetaOapg: + additional_properties = schemas.Int32Schema - 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 __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) - def __new__( + 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: 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 + *args, + _configuration=_configuration, + **kwargs, + ) @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -63,7 +61,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py index 8dcf32de5a1..ae0cc9f4962 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py @@ -18,19 +18,17 @@ from petstore_api.model.order import Order -class BodySchemas: - # body schemas - application_xml = Order - application_json = Order - pass +# body schemas +application_xml = Order +application_json = Order @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: schemas.Unset = schemas.unset @@ -39,10 +37,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py index 8dcf32de5a1..ae0cc9f4962 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py @@ -18,19 +18,17 @@ from petstore_api.model.order import Order -class BodySchemas: - # body schemas - application_xml = Order - application_json = Order - pass +# body schemas +application_xml = Order +application_json = Order @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: schemas.Unset = schemas.unset @@ -39,10 +37,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py index 31da14238fe..c8389f61c89 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py @@ -41,19 +41,17 @@ class Params(RequiredParams, OptionalParams): x_expires_after.parameter_oapg, ] -class BodySchemas: - # body schemas - application_xml = schemas.StrSchema - application_json = schemas.StrSchema - pass +# body schemas +application_xml = schemas.StrSchema +application_json = schemas.StrSchema @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: Header.Params @@ -62,10 +60,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, headers=Header.parameters diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py index dfa7a123c31..2471814703f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py @@ -18,19 +18,17 @@ from petstore_api.model.user import User -class BodySchemas: - # body schemas - application_xml = User - application_json = User - pass +# body schemas +application_xml = User +application_json = User @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_xml, - BodySchemas.application_json, + application_xml, + application_json, ] headers: schemas.Unset = schemas.unset @@ -39,10 +37,10 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/xml': api_client.MediaType( - schema=BodySchemas.application_xml, + schema=application_xml, ), 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=application_json, ), }, ) From ee7dc54baa2baca2802b1ea4219316a948d5f376 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 19 Oct 2022 09:50:37 -0700 Subject: [PATCH 19/23] Adds code to generate response header modules --- .../languages/PythonClientCodegen.java | 10 ++++++ .../endpoint_parameter_instance.handlebars | 4 ++- .../endpoint_response_header.handlebars | 33 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response_header.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 b485474d942..9d1101bea43 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 @@ -619,6 +619,16 @@ protected void generateEndpoints(OperationsMap objs) { } String responseFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName, "__init__.py")); pathsFiles.add(Arrays.asList(responseMap, "endpoint_response.handlebars", responseFilename)); + for (CodegenParameter header: response.getResponseHeaders()) { + Map headerMap = new HashMap<>(); + headerMap.put("parameter", header); + // TODO consolidate imports into header param only + headerMap.put("imports", co.imports); + headerMap.put("packageName", packageName); + String headerModule = toModelFilename(header.baseName); + String headerFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName, headerModule+".py")); + pathsFiles.add(Arrays.asList(headerMap, "endpoint_response_header.handlebars", headerFilename)); + } } /* This stub file exists to allow pycharm to read and use typing.overload decorators for it to see that diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars index dfea53b1ba5..ed464e46778 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars @@ -1,5 +1,7 @@ -parameter_oapg = api_client.{{#if isQueryParam}}Query{{/if}}{{#if isPathParam}}Path{{/if}}{{#if isHeaderParam}}Header{{/if}}{{#if isCookieParam}}Cookie{{/if}}Parameter( +parameter_oapg = api_client.{{#if isQueryParam}}Query{{/if}}{{#if isPathParam}}Path{{/if}}{{#if isHeaderParam}}Header{{/if}}{{#if isCookieParam}}Cookie{{/if}}Parameter{{#if noName}}WithoutName{{/if}}( +{{#unless noName}} name="{{baseName}}", +{{/unless}} {{#if style}} style=api_client.ParameterStyle.{{style}}, {{/if}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response_header.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response_header.handlebars new file mode 100644 index 00000000000..2f28212c25d --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_response_header.handlebars @@ -0,0 +1,33 @@ +# coding: utf-8 + +{{>partial_header}} + +from dataclasses import dataclass +import typing_extensions +import urllib3 + +from {{packageName}} import api_client, exceptions +{{> model_templates/imports_schema_types }} +{{> model_templates/imports_schemas }} + + +{{#with parameter}} +{{#if schema}} + {{#with schema}} +{{> model_templates/schema }} + {{/with}} +{{else}} + {{#if getContent}} + {{#each getContent}} + {{#with this}} + {{#with schema}} +{{> model_templates/schema }} + {{/with}} + {{/with}} + {{/each}} + {{/if}} +{{/if}} + + +{{> endpoint_parameter_instance noName=true }} +{{/with}} \ No newline at end of file From 8ad360b120f07bbe13adb1b0735091b63d91c5cc Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 19 Oct 2022 11:24:37 -0700 Subject: [PATCH 20/23] Updates fromParameter --- .../openapitools/codegen/DefaultCodegen.java | 11 +++--- .../languages/PythonClientCodegen.java | 17 ++++++++-- .../get/response_for_200/x_expires_after.py | 34 +++++++++++++++++++ .../get/response_for_200/x_rate_limit.py | 34 +++++++++++++++++++ 4 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py 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 7a807e5ec94..e3f88168dd4 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 @@ -4242,7 +4242,7 @@ 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, r.imports, String.format(Locale.ROOT, "%sResponseParameter", r.code)); + CodegenParameter responseHeader = headerToCodegenParameter(header, headerName, r.imports, ""); responseHeaders.add(responseHeader); } r.setResponseHeaders(responseHeaders); @@ -4357,9 +4357,8 @@ public CodegenOperation fromOperation(String path, for (Parameter param : parameters) { param = ModelUtils.getReferencedParameter(this.openAPI, param); - CodegenParameter p = fromParameter(param, imports); + CodegenParameter p = fromParameter(param, imports, i.toString()); p.setContent(getContent(param.getContent(), imports, "schema")); - p.paramName = "parameter_" + i.toString(); allParams.add(p); i++; @@ -4766,7 +4765,7 @@ protected void updateParameterForString(CodegenParameter codegenParameter, Schem * @param imports set of imports for library/package/module * @return Codegen Parameter object */ - public CodegenParameter fromParameter(Parameter parameter, Set imports) { + public CodegenParameter fromParameter(Parameter parameter, Set imports, String priorJsonPathFragment) { CodegenParameter codegenParameter = CodegenModelFactory.newInstance(CodegenModelType.PARAMETER); codegenParameter.baseName = parameter.getName(); @@ -4991,7 +4990,7 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) if ("multi".equals(collectionFormat)) { codegenParameter.isCollectionFormatMulti = true; } - codegenParameter.paramName = toParamName(parameter.getName()); + codegenParameter.paramName = toParamName(priorJsonPathFragment); if (!addSchemaImportsFromV3SpecLocations) { // import if (codegenProperty.complexType != null) { @@ -7060,7 +7059,7 @@ private CodegenParameter headerToCodegenParameter(Header header, String headerNa headerParam.setExample(header.getExample()); headerParam.setContent(header.getContent()); headerParam.setExtensions(header.getExtensions()); - CodegenParameter param = fromParameter(headerParam, imports); + CodegenParameter param = fromParameter(headerParam, imports, headerName); param.setContent(getContent(headerParam.getContent(), imports, mediaTypeSchemaSuffix)); return param; } 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 9d1101bea43..6707abf0014 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 @@ -67,6 +67,7 @@ import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; +import static org.openapitools.codegen.utils.StringUtils.escape; import static org.openapitools.codegen.utils.StringUtils.underscore; public class PythonClientCodegen extends AbstractPythonCodegen { @@ -965,8 +966,8 @@ public Map postProcessAllModels(Map objs) return objs; } - public CodegenParameter fromParameter(Parameter parameter, Set imports) { - CodegenParameter cp = super.fromParameter(parameter, imports); + public CodegenParameter fromParameter(Parameter parameter, Set imports, String priorJsonPathFragment) { + CodegenParameter cp = super.fromParameter(parameter, imports, priorJsonPathFragment); if (parameter.getStyle() != null) { switch(parameter.getStyle()) { case MATRIX: @@ -2752,6 +2753,18 @@ public Map postProcessSupportingFileData(Map obj return objs; } + @Override + public String toParamName(String name) { + try { + Integer.parseInt(name); + // for parameters in path, or an endpoint + return "parameter_"+name; + } catch (NumberFormatException nfe) { + // for header parameters in responses + return toModelFilename(name); + } + } + @Override public void postProcess() { System.out.println("################################################################################"); diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py new file mode 100644 index 00000000000..3801d2620b2 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py @@ -0,0 +1,34 @@ +# 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 + + +schema = schemas.DateTimeSchema + + +parameter_oapg = api_client.HeaderParameterWithoutName( + style=api_client.ParameterStyle.SIMPLE, + schema=schema, +), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py new file mode 100644 index 00000000000..bcf463d8c92 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py @@ -0,0 +1,34 @@ +# 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 + + +schema = schemas.Int32Schema + + +parameter_oapg = api_client.HeaderParameterWithoutName( + style=api_client.ParameterStyle.SIMPLE, + schema=schema, +), From 9cafb58c9c4a8c08ec4909a9afcbf3eb7de49b6d Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 19 Oct 2022 16:42:43 -0700 Subject: [PATCH 21/23] Sample updated, fixed bug where form param was not seen as body --- .../openapitools/codegen/DefaultCodegen.java | 3 + .../languages/PythonClientCodegen.java | 9 +- .../resources/python/api_client.handlebars | 148 ++++--- .../main/resources/python/api_doc.handlebars | 53 ++- ...pi_doc_schema_fancy_schema_name.handlebars | 2 +- .../main/resources/python/api_test.handlebars | 2 +- .../endpoint_parameter_instance.handlebars | 2 +- .../python/endpoint_response.handlebars | 4 +- ...odels-for-testing-with-http-signature.yaml | 9 +- .../python/.openapi-generator/VERSION | 2 +- .../docs/apis/tags/AdditionalPropertiesApi.md | 16 +- .../python/docs/apis/tags/AllOfApi.md | 36 +- .../python/docs/apis/tags/AnyOfApi.md | 22 +- .../docs/apis/tags/ContentTypeJsonApi.md | 354 +++++++-------- .../python/docs/apis/tags/DefaultApi.md | 8 +- .../python/docs/apis/tags/EnumApi.md | 32 +- .../python/docs/apis/tags/FormatApi.md | 36 +- .../python/docs/apis/tags/ItemsApi.md | 4 +- .../python/docs/apis/tags/MaxItemsApi.md | 4 +- .../python/docs/apis/tags/MaxLengthApi.md | 4 +- .../python/docs/apis/tags/MaxPropertiesApi.md | 8 +- .../python/docs/apis/tags/MaximumApi.md | 8 +- .../python/docs/apis/tags/MinItemsApi.md | 4 +- .../python/docs/apis/tags/MinLengthApi.md | 4 +- .../python/docs/apis/tags/MinPropertiesApi.md | 4 +- .../python/docs/apis/tags/MinimumApi.md | 8 +- .../python/docs/apis/tags/ModelNotApi.md | 12 +- .../python/docs/apis/tags/MultipleOfApi.md | 16 +- .../python/docs/apis/tags/OneOfApi.md | 26 +- .../docs/apis/tags/OperationRequestBodyApi.md | 6 +- .../python/docs/apis/tags/PathPostApi.md | 354 +++++++-------- .../python/docs/apis/tags/PatternApi.md | 8 +- .../python/docs/apis/tags/PropertiesApi.md | 8 +- .../python/docs/apis/tags/RefApi.md | 32 +- .../python/docs/apis/tags/RequiredApi.md | 16 +- .../ResponseContentContentTypeSchemaApi.md | 348 +++++++-------- .../python/docs/apis/tags/TypeApi.md | 30 +- .../python/docs/apis/tags/UniqueItemsApi.md | 8 +- .../python/unit_test_api/api_client.py | 214 ++++++--- .../post/response_for_200/__init__.py} | 4 +- .../post/response_for_200/__init__.py} | 4 +- .../post/response_for_200/__init__.py} | 4 +- .../post/response_for_200/__init__.py} | 4 +- .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 28 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 17 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 16 +- .../post/response_for_200/__init__.py} | 17 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 17 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 15 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 15 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 17 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py} | 17 +- .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../post/response_for_200/__init__.py | 40 ++ .../python/docs/apis/tags/AnotherFakeApi.md | 4 +- .../python/docs/apis/tags/DefaultApi.md | 4 +- .../petstore/python/docs/apis/tags/FakeApi.md | 297 ++++++++++--- .../docs/apis/tags/FakeClassnameTags123Api.md | 4 +- .../petstore/python/docs/apis/tags/PetApi.md | 133 +++++- .../python/docs/apis/tags/StoreApi.md | 16 +- .../petstore/python/docs/apis/tags/UserApi.md | 27 +- .../python/petstore_api/api_client.py | 148 ++++--- .../another_fake_dummy/patch/parameter_0.py | 39 -- .../patch/response_for_200/__init__.py | 1 - .../paths/fake/delete/parameter_0.py | 2 +- .../paths/fake/delete/parameter_1.py | 2 +- .../paths/fake/delete/parameter_2.py | 2 +- .../paths/fake/delete/parameter_3.py | 2 +- .../paths/fake/delete/parameter_4.py | 2 +- .../paths/fake/delete/parameter_5.py | 2 +- .../petstore_api/paths/fake/get/__init__.py | 85 ++++ .../petstore_api/paths/fake/get/__init__.pyi | 85 ++++ .../paths/fake/get/parameter_0.py | 2 +- .../paths/fake/get/parameter_1.py | 2 +- .../paths/fake/get/parameter_2.py | 2 +- .../paths/fake/get/parameter_3.py | 2 +- .../paths/fake/get/parameter_4.py | 2 +- .../paths/fake/get/parameter_5.py | 2 +- .../paths/fake/get/parameter_6.py | 162 ------- .../paths/fake/patch/parameter_0.py | 39 -- .../fake/patch/response_for_200/__init__.py | 1 - .../petstore_api/paths/fake/post/__init__.py | 83 ++++ .../petstore_api/paths/fake/post/__init__.pyi | 83 ++++ .../paths/fake/post/parameter_0.py | 304 ------------- .../paths/fake/post/response_for_404.py | 28 -- .../get/parameter_0.py | 38 -- .../get/response_for_200/__init__.py | 1 - .../put/parameter_0.py | 39 -- .../put/response_for_200.py | 28 -- .../put/parameter_0.py | 2 +- .../put/parameter_1.py | 39 -- .../put/response_for_200.py | 28 -- .../put/parameter_0.py | 2 +- .../put/parameter_1.py | 2 +- .../put/parameter_2.py | 2 +- .../put/response_for_200.py | 28 -- .../fake_classname_test/patch/parameter_0.py | 39 -- .../patch/response_for_200/__init__.py | 1 - .../delete/parameter_0.py | 2 +- .../delete/response_for_200.py | 28 -- .../delete/response_for_default.py | 28 -- .../get/response_for_200/__init__.py | 1 - .../post/parameter_0.py | 65 --- .../post/response_for_200.py | 28 -- .../post/parameter_0.py | 2 +- .../post/parameter_1.py | 2 +- .../post/parameter_2.py | 175 -------- .../post/response_for_200.py | 183 -------- .../post/response_for_200/__init__.py | 1 - .../paths/fake_json_form_data/get/__init__.py | 83 ++++ .../fake_json_form_data/get/__init__.pyi | 83 ++++ .../fake_json_form_data/get/parameter_0.py | 102 ----- .../get/response_for_200.py | 28 -- .../fake_json_patch/patch/parameter_0.py | 38 -- .../fake_json_patch/patch/response_for_200.py | 28 -- .../post/parameter_0.py | 36 -- .../post/response_for_200.py | 41 -- .../post/response_for_200/__init__.py | 1 - .../paths/fake_obj_in_query/get.py | 305 ------------- .../paths/fake_obj_in_query/get.pyi | 300 ------------- .../fake_obj_in_query/get/parameter_0.py | 2 +- .../fake_obj_in_query/get/response_for_200.py | 28 -- .../post/parameter_0.py | 2 +- .../post/parameter_1.py | 2 +- .../post/parameter_10.py | 2 +- .../post/parameter_11.py | 2 +- .../post/parameter_12.py | 2 +- .../post/parameter_13.py | 2 +- .../post/parameter_14.py | 2 +- .../post/parameter_15.py | 2 +- .../post/parameter_16.py | 2 +- .../post/parameter_17.py | 2 +- .../post/parameter_18.py | 2 +- .../post/parameter_19.py | 36 -- .../post/parameter_2.py | 2 +- .../post/parameter_3.py | 2 +- .../post/parameter_4.py | 2 +- .../post/parameter_5.py | 2 +- .../post/parameter_6.py | 2 +- .../post/parameter_7.py | 2 +- .../post/parameter_8.py | 2 +- .../post/parameter_9.py | 2 +- .../post/response_for_200/__init__.py | 1 - .../post/__init__.py | 85 ++++ .../post/__init__.pyi | 85 ++++ .../post/parameter_0.py | 2 +- .../post/parameter_1.py | 100 ----- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../get/parameter_0.py | 2 +- .../get/response_for_200/__init__.py | 1 - .../fake_ref_obj_in_query/get/parameter_0.py | 2 +- .../get/response_for_200.py | 28 -- .../post/parameter_0.py | 38 -- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../fake_refs_arraymodel/post/parameter_0.py | 38 -- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../fake_refs_boolean/post/parameter_0.py | 38 -- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../post/parameter_0.py | 38 -- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../paths/fake_refs_enum/post/parameter_0.py | 38 -- .../fake_refs_enum/post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../fake_refs_mammal/post/parameter_0.py | 39 -- .../fake_refs_mammal/post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../fake_refs_number/post/parameter_0.py | 38 -- .../fake_refs_number/post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../post/parameter_0.py | 38 -- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../fake_refs_string/post/parameter_0.py | 38 -- .../fake_refs_string/post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../get/response_for_200/__init__.py | 1 - .../paths/fake_test_query_paramters/put.py | 415 ------------------ .../paths/fake_test_query_paramters/put.pyi | 410 ----------------- .../put/parameter_0.py | 2 +- .../put/parameter_1.py | 2 +- .../put/parameter_2.py | 2 +- .../put/parameter_3.py | 2 +- .../put/parameter_4.py | 2 +- .../put/parameter_5.py | 2 +- .../put/response_for_200.py | 28 -- .../post/parameter_0.py | 37 -- .../post/response_for_200.py | 41 -- .../post/response_for_200/__init__.py | 1 - .../paths/fake_upload_file/post/__init__.py | 82 ++++ .../paths/fake_upload_file/post/__init__.pyi | 82 ++++ .../fake_upload_file/post/parameter_0.py | 100 ----- .../fake_upload_file/post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../paths/fake_upload_files/post/__init__.py | 82 ++++ .../paths/fake_upload_files/post/__init__.pyi | 82 ++++ .../fake_upload_files/post/parameter_0.py | 107 ----- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../python/petstore_api/paths/foo/get.py | 290 ------------ .../python/petstore_api/paths/foo/get.pyi | 285 ------------ .../paths/foo/get/response_for_default.py | 95 ---- .../foo/get/response_for_default/__init__.py | 1 - .../paths/pet/post/parameter_0.py | 41 -- .../paths/pet/post/response_for_200.py | 28 -- .../paths/pet/post/response_for_405.py | 28 -- .../petstore_api/paths/pet/put/parameter_0.py | 41 -- .../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.py | 409 ----------------- .../paths/pet_find_by_status/get.pyi | 391 ----------------- .../pet_find_by_status/get/parameter_0.py | 2 +- .../get/response_for_200.py | 98 ----- .../get/response_for_200/__init__.py | 1 - .../get/response_for_400.py | 28 -- .../paths/pet_find_by_tags/get.py | 384 ---------------- .../paths/pet_find_by_tags/get.pyi | 374 ---------------- .../paths/pet_find_by_tags/get/parameter_0.py | 2 +- .../pet_find_by_tags/get/response_for_200.py | 98 ----- .../get/response_for_200/__init__.py | 1 - .../pet_find_by_tags/get/response_for_400.py | 28 -- .../paths/pet_pet_id/delete/parameter_0.py | 2 +- .../paths/pet_pet_id/delete/parameter_1.py | 2 +- .../pet_pet_id/delete/response_for_400.py | 28 -- .../paths/pet_pet_id/get/parameter_0.py | 2 +- .../paths/pet_pet_id/get/response_for_200.py | 48 -- .../get/response_for_200/__init__.py | 1 - .../paths/pet_pet_id/get/response_for_400.py | 28 -- .../paths/pet_pet_id/get/response_for_404.py | 28 -- .../paths/pet_pet_id/post/__init__.py | 77 ++++ .../paths/pet_pet_id/post/__init__.pyi | 77 ++++ .../paths/pet_pet_id/post/parameter_0.py | 2 +- .../paths/pet_pet_id/post/parameter_1.py | 95 ---- .../paths/pet_pet_id/post/response_for_405.py | 28 -- .../pet_pet_id_upload_image/post/__init__.py | 85 ++++ .../pet_pet_id_upload_image/post/__init__.pyi | 85 ++++ .../post/parameter_0.py | 2 +- .../post/parameter_1.py | 95 ---- .../post/response_for_200.py | 43 -- .../post/response_for_200/__init__.py | 1 - .../petstore_api/paths/store_inventory/get.py | 265 ----------- .../paths/store_inventory/get.pyi | 257 ----------- .../store_inventory/get/response_for_200.py | 69 --- .../get/response_for_200/__init__.py | 1 - .../paths/store_order/post/parameter_0.py | 39 -- .../store_order/post/response_for_200.py | 48 -- .../post/response_for_200/__init__.py | 1 - .../store_order/post/response_for_400.py | 28 -- .../delete/parameter_0.py | 2 +- .../delete/response_for_400.py | 28 -- .../delete/response_for_404.py | 28 -- .../store_order_order_id/get/parameter_0.py | 2 +- .../get/response_for_200.py | 48 -- .../get/response_for_200/__init__.py | 1 - .../get/response_for_400.py | 28 -- .../get/response_for_404.py | 28 -- .../paths/user/post/parameter_0.py | 39 -- .../paths/user/post/response_for_default.py | 28 -- .../post/parameter_0.py | 64 --- .../post/response_for_default.py | 28 -- .../user_create_with_list/post/parameter_0.py | 64 --- .../post/response_for_default.py | 28 -- .../paths/user_login/get/parameter_0.py | 2 +- .../paths/user_login/get/parameter_1.py | 2 +- .../paths/user_login/get/response_for_200.py | 72 --- .../get/response_for_200/__init__.py | 11 +- ..._after.py => parameter_x_expires_after.py} | 2 +- ...ate_limit.py => parameter_x_rate_limit.py} | 9 +- .../paths/user_login/get/response_for_400.py | 28 -- .../user_logout/get/response_for_default.py | 28 -- .../paths/user_username/delete/parameter_0.py | 2 +- .../user_username/delete/response_for_200.py | 28 -- .../user_username/delete/response_for_404.py | 28 -- .../paths/user_username/get/parameter_0.py | 2 +- .../user_username/get/response_for_200.py | 48 -- .../get/response_for_200/__init__.py | 1 - .../user_username/get/response_for_400.py | 28 -- .../user_username/get/response_for_404.py | 28 -- .../paths/user_username/put/parameter_0.py | 2 +- .../paths/user_username/put/parameter_1.py | 39 -- .../user_username/put/response_for_400.py | 28 -- .../user_username/put/response_for_404.py | 28 -- .../test_another_fake_dummy/test_patch.py | 2 +- .../test/test_paths/test_fake/test_patch.py | 2 +- .../test_get.py | 2 +- .../test_fake_classname_test/test_patch.py | 2 +- .../test_paths/test_fake_health/test_get.py | 2 +- .../test_post.py | 4 +- .../test_fake_json_with_charset/test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_get.py | 2 +- .../test_post.py | 2 +- .../test_fake_refs_arraymodel/test_post.py | 2 +- .../test_fake_refs_boolean/test_post.py | 2 +- .../test_post.py | 2 +- .../test_fake_refs_enum/test_post.py | 2 +- .../test_fake_refs_mammal/test_post.py | 2 +- .../test_fake_refs_number/test_post.py | 2 +- .../test_post.py | 2 +- .../test_fake_refs_string/test_post.py | 2 +- .../test_post.py | 2 +- .../test_fake_upload_file/test_post.py | 2 +- .../test_fake_upload_files/test_post.py | 2 +- .../test/test_paths/test_foo/test_get.py | 2 +- .../test_pet_find_by_status/test_get.py | 4 +- .../test_pet_find_by_tags/test_get.py | 4 +- .../test_paths/test_pet_pet_id/test_get.py | 4 +- .../test_pet_pet_id_upload_image/test_post.py | 2 +- .../test_store_inventory/test_get.py | 2 +- .../test_paths/test_store_order/test_post.py | 4 +- .../test_store_order_order_id/test_get.py | 4 +- .../test_paths/test_user_login/test_get.py | 4 +- .../test_paths/test_user_username/test_get.py | 4 +- 478 files changed, 8477 insertions(+), 10213 deletions(-) rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake/get/response_for_404.py => 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/__init__.py} (87%) rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake/post/response_for_200.py => 3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/response_for_200/__init__.py} (87%) rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake/delete/response_for_200.py => 3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/response_for_200/__init__.py} (87%) rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake/get/response_for_200.py => 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/__init__.py} (87%) 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__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/response_for_200/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__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/response_for_200/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake_health/get/response_for_200.py => 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/__init__.py} (66%) 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/__init__.py 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200.py => 3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/response_for_200/__init__.py} (73%) rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200.py => 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/__init__.py} (69%) 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake/patch/response_for_200.py => 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/__init__.py} (69%) 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200.py => 3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/response_for_200/__init__.py} (71%) 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200.py => 3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/response_for_200/__init__.py} (71%) 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200.py => 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/__init__.py} (62%) 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py rename samples/openapi3/client/{petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200.py => 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/__init__.py} (68%) 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/__init__.py 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/__init__.py 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/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__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/response_for_200/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py 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/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py delete 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/parameter_2.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_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/parameter_19.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py rename samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/{x_expires_after.py => parameter_x_expires_after.py} (99%) rename samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/{x_rate_limit.py => parameter_x_rate_limit.py} (83%) delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400.py delete 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/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e3f88168dd4..8685ccf6a65 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 @@ -4331,6 +4331,9 @@ public CodegenOperation fromOperation(String path, setParameterEncodingValues(cp, requestBody.getContent().get(contentType)); postProcessParameter(cp); } + if (formParams.size() == 1) { + bodyParam = formParams.get(0); + } } else { // process body parameter requestBody = ModelUtils.getReferencedRequestBody(this.openAPI, requestBody); 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 6707abf0014..e6210d48872 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 @@ -600,7 +600,7 @@ protected void generateEndpoints(OperationsMap objs) { // TODO consolidate imports into body param only paramMap.put("imports", co.imports); paramMap.put("packageName", packageName); - outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, "parameter_"+i.toString()+".py")); + outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, toParamName(i.toString())+".py")); pathsFiles.add(Arrays.asList(paramMap, "endpoint_parameter.handlebars", outputFilename)); i++; } @@ -626,8 +626,7 @@ protected void generateEndpoints(OperationsMap objs) { // TODO consolidate imports into header param only headerMap.put("imports", co.imports); headerMap.put("packageName", packageName); - String headerModule = toModelFilename(header.baseName); - String headerFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName, headerModule+".py")); + String headerFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod, responseModuleName, toParamName(header.baseName) + ".py")); pathsFiles.add(Arrays.asList(headerMap, "endpoint_response_header.handlebars", headerFilename)); } } @@ -2758,10 +2757,10 @@ public String toParamName(String name) { try { Integer.parseInt(name); // for parameters in path, or an endpoint - return "parameter_"+name; + return "parameter_" + name; } catch (NumberFormatException nfe) { // for header parameters in responses - return toModelFilename(name); + return "parameter_" + toModelFilename(name); } } 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 921d2fb1ff0..547af6a8ce6 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 @@ -321,6 +321,18 @@ class StyleSimpleSerializer(ParameterSerializerBase): prefix_separator_iterator=prefix_separator_iterator ) + def _deserialize_simple( + self, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + class JSONDetector: """ @@ -759,6 +771,27 @@ class HeaderParameterWithoutName(ParameterBase, StyleSimpleSerializer): return self.__to_headers(((name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + def deserialize( + self, + in_data: str, + name: str + ) -> Schema: + if self.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + extracted_data = self._deserialize_simple(in_data, name, self.explode, False) + return schema.from_openapi_data_oapg(extracted_data) + # self.content will be length one + for content_type, schema in self.content.items(): + if self._content_type_is_json(content_type): + cast_in_data = json.loads(in_data) + return schema.from_openapi_data_oapg(cast_in_data) + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + class HeaderParameter(HeaderParameterWithoutName): name: str @@ -778,7 +811,6 @@ class HeaderParameter(HeaderParameterWithoutName): raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.name = name super().__init__( - in_type=ParameterInType.HEADER, required=required, style=style, explode=explode, @@ -832,13 +864,13 @@ class MediaType: class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] - headers: typing.Union[Unset, typing.List[HeaderParameter]] + headers: typing.Union[Unset, typing.Dict[str, Schema]] def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]] = unset, - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -851,18 +883,63 @@ class ApiResponse: @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + +class TypedDictInputVerifier: + @staticmethod + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): + """ + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes + """ + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) -class OpenApiResponse(JSONDetector): + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) + + +class OpenApiResponse(JSONDetector, TypedDictInputVerifier): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') def __init__( self, response_cls: typing.Type[ApiResponse] = ApiResponse, content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, + headers: typing.Optional[typing.Dict[str, HeaderParameterWithoutName]] = None, ): self.headers = headers if content is not None and len(content) == 0: @@ -952,8 +1029,14 @@ class OpenApiResponse(JSONDetector): deserialized_headers = unset if self.headers is not None: - # TODO add header deserialiation here - pass + self._verify_typed_dict_inputs_oapg(self.response_cls.headers, response.headers) + deserialized_headers = {} + for header_name, header_param in self.headers.items(): + header_value = response.getheader(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value if self.content is not None: if content_type not in self.content: @@ -1303,7 +1386,7 @@ class ApiClient: ) -class Api: +class Api(TypedDictInputVerifier): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -1315,49 +1398,6 @@ class Api: api_client = ApiClient() self.api_client = api_client - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - def _get_host_oapg( self, operation_id: str, 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 8075c8bf1f3..dbecff4efd6 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 @@ -180,27 +180,48 @@ default | [response_for_default.ApiResponse](#{{operationId}}.response_for_defau Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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}} | +body | {{#unless content}}Unset{{else}}typing.Union[{{#each content}}{{#if this.schema}}[response_for_{{code}}.{{#if this.schema.nameInSnakeCase}}{{this.schema.name}}{{else}}{{this.schema.baseName}}{{/if}}](#{{operationId}}.response_for_{{code}}.{{#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}}[response_for_{{code}}.Headers](#{{operationId}}.response_for_{{code}}.Headers){{/unless}} | {{#unless responseHeaders}}headers were not defined{{/unless}} | {{#each content}} -{{#with this.schema}} -{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="response_for_" schemaNamePrefix2=../../code schemaNamePrefix3=".BodySchemas." complexTypePrefix="../../models/" }} -{{/with}} + {{#with this.schema}} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="response_for_" schemaNamePrefix2=../../code schemaNamePrefix3="." complexTypePrefix="../../models/" }} + {{/with}} {{/each}} {{#if responseHeaders}} -#### ResponseHeadersFor{{code}} +#### response_for_{{code}}.Headers -Name | Type | Description | Notes +Key | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- - {{#each responseHeaders}} -{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} - {{/each}} - {{#each responseHeaders}} - {{#with schema}} -{{> api_doc_schema_type_hint complexTypePrefix="../../models/" }} - {{/with}} - {{/each}} - + {{#each responseHeaders}} + {{#if schema}} + {{#with schema}} +{{../baseName}} | [response_for_{{../code}}.{{../paramName}}.schema](#{{../operationId}}.response_for_{{../code}}.{{../paramName}}.schema) | | {{#unless required}}optional{{/unless}} + {{/with}} + {{else}} + {{#each getContent}} + {{#with this}} + {{#with schema}} +{{../baseName}} | [response_for_{{../code}}.{{../paramName}}.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}](#{{../operationId}}.response_for_{{../code}}.{{../paramName}}.{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}) | | {{#unless required}}optional{{/unless}} + {{/with}} + {{/with}} + {{/each}} + {{/if}} + {{/each}} + {{#each responseHeaders}} + {{#if schema}} + {{#with schema}} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="response_for_" schemaNamePrefix2=../../code schemaNamePrefix3="." schemaNamePrefix4=../paramName schemaNamePrefix5="." complexTypePrefix="../../models/" }} + {{/with}} + {{else}} + {{#each getContent}} + {{#with this}} + {{#with schema}} +{{> api_doc_schema_type_hint anchorPrefix=../../operationId schemaNamePrefix1="response_for_" schemaNamePrefix2=../../code schemaNamePrefix3="." schemaNamePrefix4=../paramName schemaNamePrefix5="." complexTypePrefix="../../models/" }} + {{/with}} + {{/with}} + {{/each}} + {{/if}} + {{/each}} {{/if}} {{/each}} 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 index 2aa281a2010..f2ae64e7493 100644 --- 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 @@ -1 +1 @@ -{{schemaNamePrefix1}}{{#if schemaNamePrefix2}}{{schemaNamePrefix2}}{{/if}}{{#if schemaNamePrefix3}}{{schemaNamePrefix3}}{{/if}}{{#unless schemaNamePrefix2 schemaNamePrefix3}}.{{/unless}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}} \ No newline at end of file +{{schemaNamePrefix1}}{{#if schemaNamePrefix2}}{{schemaNamePrefix2}}{{/if}}{{#if schemaNamePrefix3}}{{schemaNamePrefix3}}{{/if}}{{#if schemaNamePrefix4}}{{schemaNamePrefix4}}{{/if}}{{#if schemaNamePrefix5}}{{schemaNamePrefix5}}{{/if}}{{#unless schemaNamePrefix2 schemaNamePrefix3 schemaNamePrefix4 schemaNamePrefix5}}.{{/unless}}{{#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_test.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/api_test.handlebars index 2155eaf2182..674c96c0a9f 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 @@ -37,7 +37,7 @@ class Test{{operationIdSnakeCase}}(ApiTestMixin, unittest.TestCase): {{#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}} + response_body_schema = {{httpMethod}}.response_for_{{#if ../isDefault}}default{{else}}{{code}}{{/if}}.{{#if schema.nameInSnakeCase}}{{schema.name}}{{else}}{{schema.baseName}}{{/if}} {{/if}} {{#if this.testCases}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars index ed464e46778..be6719e8ce7 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_parameter_instance.handlebars @@ -23,4 +23,4 @@ parameter_oapg = api_client.{{#if isQueryParam}}Query{{/if}}{{#if isPathParam}}P {{#if isExplode}} explode=True, {{/if}} -), +) 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 index af595ab0ccb..7201eb3577b 100644 --- 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 @@ -5,12 +5,14 @@ from {{packageName}} import api_client {{> model_templates/imports_schema_types }} {{#with response}} {{> model_templates/imports_schemas }} +{{#each responseHeaders}} +from . import {{paramName}} +{{/each}} {{#if responseHeaders}} {{> endpoint_parameter_schema_and_def xParams=responseHeaders xParamsName="Header" }} {{/if}} {{#if getContent}} - # body schemas {{#each content}} {{#with this.schema}} diff --git a/modules/openapi-json-schema-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-json-schema-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index fada2f034af..94f2525a052 100644 --- a/modules/openapi-json-schema-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-json-schema-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -451,9 +451,12 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user - schema: - type: integer - format: int32 + required: true + content: + application/json: + schema: + type: integer + format: int32 X-Expires-After: description: date in UTC when token expires schema: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION index 359a5b952d4..717311e32e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +unset \ No newline at end of file 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 4757a310c04..46d3f4797c6 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 @@ -128,10 +128,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -254,10 +254,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -382,10 +382,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -508,10 +508,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 0ab59442d7d..6bafe0c17a0 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 @@ -135,10 +135,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -261,10 +261,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -387,10 +387,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -513,10 +513,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -639,10 +639,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -765,10 +765,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -891,10 +891,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1017,10 +1017,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1143,10 +1143,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 64aad080c16..a788292fe76 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 @@ -127,10 +127,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -253,10 +253,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -291,7 +291,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = any_of_api.AnyOfApi(api_client) # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") + body = AnyofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_anyof_with_base_schema_request_body( body=body, @@ -379,10 +379,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -505,10 +505,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -631,10 +631,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 0eee1eb87d6..96e375fdcd7 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 @@ -294,10 +294,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -420,10 +420,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -548,10 +548,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -674,10 +674,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -800,10 +800,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -926,10 +926,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -1052,10 +1052,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1178,10 +1178,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1304,10 +1304,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1430,10 +1430,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1556,10 +1556,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1682,10 +1682,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1808,10 +1808,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1934,10 +1934,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1972,7 +1972,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 = AnyofWithBaseSchema("body_example") + body = AnyofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_anyof_with_base_schema_request_body( body=body, @@ -2060,10 +2060,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2186,10 +2186,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2314,10 +2314,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2440,10 +2440,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -2566,10 +2566,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_int_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2692,10 +2692,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2818,10 +2818,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2944,10 +2944,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -3070,10 +3070,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_email_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -3196,10 +3196,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3322,10 +3322,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3448,10 +3448,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3574,10 +3574,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3700,10 +3700,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3829,10 +3829,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3955,10 +3955,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4081,10 +4081,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -4207,10 +4207,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -4333,10 +4333,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4459,10 +4459,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4585,10 +4585,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -4711,10 +4711,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -4837,10 +4837,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -4963,10 +4963,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5089,10 +5089,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5215,10 +5215,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5341,10 +5341,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5467,10 +5467,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5593,10 +5593,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5719,10 +5719,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5845,10 +5845,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -5971,10 +5971,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6097,10 +6097,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6223,10 +6223,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6349,10 +6349,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6475,10 +6475,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6609,10 +6609,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6735,10 +6735,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6861,10 +6861,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -6987,10 +6987,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -7113,10 +7113,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7239,10 +7239,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -7365,10 +7365,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -7491,10 +7491,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7617,10 +7617,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -7743,10 +7743,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -7869,10 +7869,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -7907,7 +7907,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 = OneofWithBaseSchema("body_example") + body = OneofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_oneof_with_base_schema_request_body( body=body, @@ -7995,10 +7995,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8121,10 +8121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8247,10 +8247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8373,10 +8373,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8499,10 +8499,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8625,10 +8625,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8751,10 +8751,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -8879,10 +8879,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9005,10 +9005,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9131,10 +9131,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9259,10 +9259,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9385,10 +9385,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -9511,10 +9511,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9637,10 +9637,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -9763,10 +9763,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -9889,10 +9889,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10015,10 +10015,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10141,10 +10141,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -10267,10 +10267,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10305,7 +10305,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 = StringTypeMatchesStrings("body_example") + body = StringTypeMatchesStrings("parameter_body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -10393,10 +10393,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -10521,10 +10521,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10647,10 +10647,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -10773,10 +10773,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -10899,10 +10899,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -11025,10 +11025,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -11151,10 +11151,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 4276d3f12b4..356d27b76c8 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -249,10 +249,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 3b2231ac97f..9ad730862b9 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 @@ -133,10 +133,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -259,10 +259,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -385,10 +385,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -511,10 +511,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -637,10 +637,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -766,10 +766,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -892,10 +892,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -1018,10 +1018,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 113c1793cfb..40250c1a4a8 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 @@ -135,10 +135,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -261,10 +261,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_email_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -387,10 +387,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -513,10 +513,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -639,10 +639,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -765,10 +765,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -891,10 +891,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -1017,10 +1017,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -1143,10 +1143,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 8418869b055..a6a3c5247c0 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 @@ -127,10 +127,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 87c5958a398..86de173ca63 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 @@ -119,10 +119,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 379cec8ba54..f031d02fba5 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 @@ -119,10 +119,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 219fe352da1..0aa80e98ec3 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -247,10 +247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 0a8c162ae71..e29b69a1308 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -247,10 +247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 129d0275299..ee4f86b5255 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 @@ -119,10 +119,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 efc42914794..2827caf5861 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 @@ -119,10 +119,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 66081273e3b..71d29952959 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 @@ -119,10 +119,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 43252b0628d..4370c5a5dbb 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -247,10 +247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 13ac43ee190..09e8e4c81d8 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 @@ -123,10 +123,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -249,10 +249,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -375,10 +375,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 148e5536b9d..c36498de7b6 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 @@ -125,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_int_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -251,10 +251,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -377,10 +377,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -503,10 +503,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 915e5094338..44f6007dab2 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 @@ -129,10 +129,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -255,10 +255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -381,10 +381,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -419,7 +419,7 @@ with unit_test_api.ApiClient(configuration) as api_client: api_instance = one_of_api.OneOfApi(api_client) # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") + body = OneofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_oneof_with_base_schema_request_body( body=body, @@ -507,10 +507,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -633,10 +633,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -759,10 +759,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 525f81aeedd..717350cb1f3 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 @@ -1087,7 +1087,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 = AnyofWithBaseSchema("body_example") + body = AnyofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_anyof_with_base_schema_request_body( body=body, @@ -4343,7 +4343,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 = OneofWithBaseSchema("body_example") + body = OneofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_oneof_with_base_schema_request_body( body=body, @@ -5658,7 +5658,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 = StringTypeMatchesStrings("body_example") + body = StringTypeMatchesStrings("parameter_body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, 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 7032a43dea3..55f10b790be 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 @@ -294,10 +294,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -420,10 +420,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -548,10 +548,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -674,10 +674,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -800,10 +800,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -926,10 +926,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -1052,10 +1052,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -1178,10 +1178,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -1304,10 +1304,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -1430,10 +1430,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -1556,10 +1556,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -1682,10 +1682,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -1808,10 +1808,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -1934,10 +1934,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -1972,7 +1972,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 = AnyofWithBaseSchema("body_example") + body = AnyofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_anyof_with_base_schema_request_body( body=body, @@ -2060,10 +2060,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -2186,10 +2186,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -2314,10 +2314,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -2440,10 +2440,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -2566,10 +2566,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_int_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -2692,10 +2692,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -2818,10 +2818,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -2944,10 +2944,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -3070,10 +3070,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_email_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -3196,10 +3196,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -3322,10 +3322,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -3448,10 +3448,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -3574,10 +3574,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -3700,10 +3700,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -3829,10 +3829,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -3955,10 +3955,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -4081,10 +4081,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -4207,10 +4207,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -4333,10 +4333,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -4459,10 +4459,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -4585,10 +4585,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -4711,10 +4711,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -4837,10 +4837,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -4963,10 +4963,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -5089,10 +5089,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -5215,10 +5215,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -5341,10 +5341,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -5467,10 +5467,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -5593,10 +5593,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -5719,10 +5719,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -5845,10 +5845,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -5971,10 +5971,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -6097,10 +6097,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -6223,10 +6223,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -6349,10 +6349,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -6475,10 +6475,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -6609,10 +6609,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -6735,10 +6735,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -6861,10 +6861,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -6987,10 +6987,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -7113,10 +7113,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -7239,10 +7239,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -7365,10 +7365,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -7491,10 +7491,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -7617,10 +7617,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -7743,10 +7743,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -7869,10 +7869,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -7907,7 +7907,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 = OneofWithBaseSchema("body_example") + body = OneofWithBaseSchema("parameter_body_example") try: api_response = api_instance.post_oneof_with_base_schema_request_body( body=body, @@ -7995,10 +7995,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -8121,10 +8121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -8247,10 +8247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -8373,10 +8373,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -8499,10 +8499,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -8625,10 +8625,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -8751,10 +8751,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -8879,10 +8879,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -9005,10 +9005,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -9131,10 +9131,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -9259,10 +9259,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -9385,10 +9385,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -9511,10 +9511,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -9637,10 +9637,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -9763,10 +9763,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -9889,10 +9889,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -10015,10 +10015,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -10141,10 +10141,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -10267,10 +10267,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -10305,7 +10305,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 = StringTypeMatchesStrings("body_example") + body = StringTypeMatchesStrings("parameter_body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -10393,10 +10393,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -10521,10 +10521,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -10647,10 +10647,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -10773,10 +10773,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -10899,10 +10899,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -11025,10 +11025,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -11151,10 +11151,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 cbf016cab15..51a20cd2558 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -247,10 +247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 7199f3c86af..20ede7002cc 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -247,10 +247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 ddcb5b3b647..7752ac61c61 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 @@ -133,10 +133,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -261,10 +261,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -387,10 +387,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -513,10 +513,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -641,10 +641,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -767,10 +767,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -893,10 +893,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -1019,10 +1019,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 447bb499c14..9567247b593 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 @@ -125,10 +125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -251,10 +251,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -377,10 +377,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -503,10 +503,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 d1fdf699313..92b70c9f747 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 @@ -135,10 +135,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | @@ -192,10 +192,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | @@ -249,10 +249,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | @@ -306,10 +306,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | @@ -363,10 +363,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | @@ -420,10 +420,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Allof**](../../models/Allof.md) | | @@ -477,10 +477,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_simple_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | @@ -534,10 +534,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | @@ -591,10 +591,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | @@ -648,10 +648,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_first_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | @@ -705,10 +705,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_the_last_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | @@ -762,10 +762,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_allof_with_two_empty_schemas_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | @@ -819,10 +819,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | @@ -876,10 +876,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Anyof**](../../models/Anyof.md) | | @@ -933,10 +933,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | @@ -990,10 +990,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_anyof_with_one_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | @@ -1047,10 +1047,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -1104,10 +1104,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -1161,10 +1161,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_int_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_int_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByInt**](../../models/ByInt.md) | | @@ -1218,10 +1218,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ByNumber**](../../models/ByNumber.md) | | @@ -1275,10 +1275,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_by_small_number_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BySmallNumber**](../../models/BySmallNumber.md) | | @@ -1332,10 +1332,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_date_time_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**DateTimeFormat**](../../models/DateTimeFormat.md) | | @@ -1389,10 +1389,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_email_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_email_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EmailFormat**](../../models/EmailFormat.md) | | @@ -1446,10 +1446,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with0_does_not_match_false_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | @@ -1503,10 +1503,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with1_does_not_match_true_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | @@ -1560,10 +1560,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | @@ -1617,10 +1617,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_false_does_not_match0_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | @@ -1674,10 +1674,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_enum_with_true_does_not_match1_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | @@ -1731,10 +1731,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_enums_in_properties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**EnumsInProperties**](../../models/EnumsInProperties.md) | | @@ -1788,10 +1788,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_forbidden_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | @@ -1845,10 +1845,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_hostname_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HostnameFormat**](../../models/HostnameFormat.md) | | @@ -1902,10 +1902,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -1959,10 +1959,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | @@ -2016,10 +2016,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_invalid_string_value_for_default_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | @@ -2073,10 +2073,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv4_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv4Format**](../../models/Ipv4Format.md) | | @@ -2130,10 +2130,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ipv6_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Ipv6Format**](../../models/Ipv6Format.md) | | @@ -2187,10 +2187,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_json_pointer_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**JsonPointerFormat**](../../models/JsonPointerFormat.md) | | @@ -2244,10 +2244,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidation**](../../models/MaximumValidation.md) | | @@ -2301,10 +2301,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | @@ -2358,10 +2358,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | @@ -2415,10 +2415,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | @@ -2472,10 +2472,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | @@ -2529,10 +2529,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_maxproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | @@ -2586,10 +2586,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidation**](../../models/MinimumValidation.md) | | @@ -2643,10 +2643,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_minimum_validation_with_signed_integer_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | @@ -2700,10 +2700,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinitemsValidation**](../../models/MinitemsValidation.md) | | @@ -2757,10 +2757,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minlength_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinlengthValidation**](../../models/MinlengthValidation.md) | | @@ -2814,10 +2814,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_minproperties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | @@ -2871,10 +2871,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | @@ -2928,10 +2928,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | @@ -2985,10 +2985,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_nested_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedItems**](../../models/NestedItems.md) | | @@ -3042,10 +3042,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | @@ -3099,10 +3099,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_more_complex_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NotMoreComplexSchema**](../../models/NotMoreComplexSchema.md) | | @@ -3156,10 +3156,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ModelNot**](../../models/ModelNot.md) | | @@ -3213,10 +3213,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_nul_characters_in_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | @@ -3270,10 +3270,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -3327,10 +3327,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -3384,10 +3384,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_properties_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | @@ -3441,10 +3441,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -3498,10 +3498,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_complex_types_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | @@ -3555,10 +3555,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Oneof**](../../models/Oneof.md) | | @@ -3612,10 +3612,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_base_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | @@ -3669,10 +3669,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_empty_schema_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | @@ -3726,10 +3726,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_oneof_with_required_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**OneofWithRequired**](../../models/OneofWithRequired.md) | | @@ -3783,10 +3783,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_is_not_anchored_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | @@ -3840,10 +3840,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_pattern_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PatternValidation**](../../models/PatternValidation.md) | | @@ -3897,10 +3897,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_properties_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | @@ -3954,10 +3954,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | @@ -4011,10 +4011,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_additionalproperties_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | @@ -4068,10 +4068,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_allof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAllof**](../../models/RefInAllof.md) | | @@ -4125,10 +4125,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_anyof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInAnyof**](../../models/RefInAnyof.md) | | @@ -4182,10 +4182,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_items_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInItems**](../../models/RefInItems.md) | | @@ -4239,10 +4239,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_not_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInNot**](../../models/RefInNot.md) | | @@ -4296,10 +4296,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_oneof_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInOneof**](../../models/RefInOneof.md) | | @@ -4353,10 +4353,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_ref_in_property_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RefInProperty**](../../models/RefInProperty.md) | | @@ -4410,10 +4410,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_default_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | @@ -4467,10 +4467,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_required_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredValidation**](../../models/RequiredValidation.md) | | @@ -4524,10 +4524,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_empty_array_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | @@ -4581,10 +4581,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_required_with_escaped_characters_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**RequiredWithEscapedCharacters**](../../models/RequiredWithEscapedCharacters.md) | | @@ -4638,10 +4638,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_simple_enum_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | @@ -4695,10 +4695,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringTypeMatchesStrings**](../../models/StringTypeMatchesStrings.md) | | @@ -4752,10 +4752,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | @@ -4809,10 +4809,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -4866,10 +4866,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | @@ -4923,10 +4923,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriFormat**](../../models/UriFormat.md) | | @@ -4980,10 +4980,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_reference_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UriReferenceFormat**](../../models/UriReferenceFormat.md) | | @@ -5037,10 +5037,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uri_template_format_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 b6ae3ce197e..9b9b6ae290b 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 @@ -133,10 +133,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_array_type_matches_arrays_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | @@ -259,10 +259,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_boolean_type_matches_booleans_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**BooleanTypeMatchesBooleans**](../../models/BooleanTypeMatchesBooleans.md) | | @@ -385,10 +385,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_integer_type_matches_integers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**IntegerTypeMatchesIntegers**](../../models/IntegerTypeMatchesIntegers.md) | | @@ -511,10 +511,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_null_type_matches_only_the_null_object_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NullTypeMatchesOnlyTheNullObject**](../../models/NullTypeMatchesOnlyTheNullObject.md) | | @@ -637,10 +637,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_number_type_matches_numbers_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberTypeMatchesNumbers**](../../models/NumberTypeMatchesNumbers.md) | | @@ -763,10 +763,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_object_type_matches_objects_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectTypeMatchesObjects**](../../models/ObjectTypeMatchesObjects.md) | | @@ -801,7 +801,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 = StringTypeMatchesStrings("body_example") + body = StringTypeMatchesStrings("parameter_body_example") try: api_response = api_instance.post_string_type_matches_strings_request_body( body=body, @@ -889,10 +889,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#post_string_type_matches_strings_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 033ca75fea1..aa058c1b047 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 @@ -121,10 +121,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_false_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | @@ -247,10 +247,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#post_uniqueitems_validation_response_body_for_content_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | 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 5b87db4d6b2..e772ef8ad95 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 @@ -325,6 +325,18 @@ def _serialize_simple( prefix_separator_iterator=prefix_separator_iterator ) + def _deserialize_simple( + self, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + class JSONDetector: """ @@ -345,7 +357,6 @@ def _content_type_is_json(cls, content_type: str) -> bool: @dataclasses.dataclass class ParameterBase(JSONDetector): - name: str in_type: ParameterInType required: bool style: typing.Optional[ParameterStyle] @@ -369,7 +380,6 @@ class ParameterBase(JSONDetector): ParameterInType.HEADER: ParameterStyle.SIMPLE, ParameterInType.COOKIE: ParameterStyle.FORM, } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() @classmethod @@ -386,7 +396,6 @@ def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_ty def __init__( self, - name: str, in_type: ParameterInType, required: bool = False, style: typing.Optional[ParameterStyle] = None, @@ -399,15 +408,12 @@ def __init__( raise ValueError('Value missing; Pass in either schema or content') if schema and content: raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.__verify_style_to_in_type(style, in_type) if content is None and style is None: style = self.__in_type_to_default_style[in_type] if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: raise ValueError('Invalid content length, content length must equal 1') self.in_type = in_type - self.name = name self.required = required self.style = style self.explode = explode @@ -426,6 +432,7 @@ def _serialize_json( class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str def __init__( self, @@ -437,8 +444,8 @@ def __init__( schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): + self.name = name super().__init__( - name, in_type=ParameterInType.PATH, required=required, style=style, @@ -523,6 +530,7 @@ def serialize( class QueryParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -537,8 +545,8 @@ def __init__( used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.QUERY, required=required, style=used_style, @@ -650,6 +658,7 @@ def serialize( class CookieParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -664,8 +673,8 @@ def __init__( used_style = ParameterStyle.FORM if style is None and content is None and schema else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.COOKIE, required=required, style=used_style, @@ -710,10 +719,10 @@ def serialize( raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) -class HeaderParameter(ParameterBase, StyleSimpleSerializer): +class HeaderParameterWithoutName(ParameterBase, StyleSimpleSerializer): + def __init__( self, - name: str, required: bool = False, style: typing.Optional[ParameterStyle] = None, explode: bool = False, @@ -722,7 +731,6 @@ def __init__( content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): super().__init__( - name, in_type=ParameterInType.HEADER, required=required, style=style, @@ -744,7 +752,8 @@ def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHead def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + name: str ) -> HTTPHeaderDict: if self.schema: cast_in_data = self.schema(in_data) @@ -755,17 +764,76 @@ def serialize( returns headers: dict """ if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) + value = self._serialize_simple(cast_in_data, name, self.explode, False) + return self.__to_headers(((name, value),)) # self.content will be length one for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) + return self.__to_headers(((name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + def deserialize( + self, + in_data: str, + name: str + ) -> Schema: + if self.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + extracted_data = self._deserialize_simple(in_data, name, self.explode, False) + return schema.from_openapi_data_oapg(extracted_data) + # self.content will be length one + for content_type, schema in self.content.items(): + if self._content_type_is_json(content_type): + cast_in_data = json.loads(in_data) + return schema.from_openapi_data_oapg(cast_in_data) + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + + +class HeaderParameter(HeaderParameterWithoutName): + name: str + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.name = name + super().__init__( + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> HTTPHeaderDict: + return super().serialize( + in_data, + self.name + ) + class Encoding: def __init__( @@ -801,13 +869,13 @@ class MediaType: class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] - headers: typing.Union[Unset, typing.List[HeaderParameter]] + headers: typing.Union[Unset, typing.Dict[str, Schema]] def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]] = unset, - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -820,18 +888,63 @@ def __init__( @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + + +class TypedDictInputVerifier: + @staticmethod + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): + """ + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes + """ + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) + + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) -class OpenApiResponse(JSONDetector): +class OpenApiResponse(JSONDetector, TypedDictInputVerifier): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') def __init__( self, response_cls: typing.Type[ApiResponse] = ApiResponse, content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, + headers: typing.Optional[typing.Dict[str, HeaderParameterWithoutName]] = None, ): self.headers = headers if content is not None and len(content) == 0: @@ -921,8 +1034,14 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati deserialized_headers = unset if self.headers is not None: - # TODO add header deserialiation here - pass + self._verify_typed_dict_inputs_oapg(self.response_cls.headers, response.headers) + deserialized_headers = {} + for header_name, header_param in self.headers.items(): + header_value = response.getheader(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value if self.content is not None: if content_type not in self.content: @@ -1258,7 +1377,7 @@ def update_params_for_auth(self, headers, auth_settings, ) -class Api: +class Api(TypedDictInputVerifier): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -1270,49 +1389,6 @@ def __init__(self, api_client: typing.Optional[ApiClient] = None): api_client = ApiClient() self.api_client = api_client - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - def _get_host_oapg( self, operation_id: str, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.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/__init__.py similarity index 87% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.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/response_for_200/__init__.py index 7ec95a8627a..ce057133be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_404.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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,7 +13,7 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 @dataclasses.dataclass diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/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/__init__.py similarity index 87% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_200.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/response_for_200/__init__.py index 7ec95a8627a..ce057133be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,7 +13,7 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 @dataclasses.dataclass diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/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/__init__.py similarity index 87% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/response_for_200.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/response_for_200/__init__.py index 7ec95a8627a..ce057133be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,7 +13,7 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 @dataclasses.dataclass diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/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/__init__.py similarity index 87% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/response_for_200.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/response_for_200/__init__.py index 7ec95a8627a..ce057133be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,7 +13,7 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 @dataclasses.dataclass 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/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/response_for_200/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__init__.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/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__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/response_for_200/__init__.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/__init__.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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..9379855beba --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AdditionalpropertiesAllowsASchemaWhichShouldValidate + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..5432b264a7d --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AdditionalpropertiesAreAllowedByDefault + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/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/__init__.py similarity index 66% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200.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/response_for_200/__init__.py index bb59ed13e40..36a412fc3c8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,22 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 -from petstore_api.model.health_check_result import HealthCheckResult +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself - -class BodySchemas: - # body schemas - application_json = HealthCheckResult - pass +# body schemas +application_json = AdditionalpropertiesCanExistByItself @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..a608e25aa52 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AdditionalpropertiesShouldNotLookInApplicators + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..1f2bc06839b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AllofCombinedWithAnyofOneof + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/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/__init__.py similarity index 73% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200.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/response_for_200/__init__.py index e31f6c2fbbc..0ca352f4e2f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,20 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 +from unit_test_api.model.allof import Allof -class BodySchemas: - # body schemas - pass +# body schemas +application_json = Allof @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - schemas.Unset, - schemas.Unset, + application_json, ] headers: schemas.Unset = schemas.unset @@ -35,8 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - ), - 'application/xml': api_client.MediaType( + schema=application_json, ), }, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/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/__init__.py similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200.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/response_for_200/__init__.py index d54e97d5447..23e3f17abba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,22 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 -from petstore_api.model.client import Client +from unit_test_api.model.allof_simple_types import AllofSimpleTypes - -class BodySchemas: - # body schemas - application_json = Client - pass +# body schemas +application_json = AllofSimpleTypes @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..7e1028de645 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AllofWithBaseSchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..bfff58a71cc --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AllofWithOneEmptySchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..a620fdeb15c --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AllofWithTheFirstEmptySchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..d7e03ad92c7 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AllofWithTheLastEmptySchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/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/__init__.py similarity index 69% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200.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/response_for_200/__init__.py index d54e97d5447..c1f6badab1a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,22 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 -from petstore_api.model.client import Client +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas - -class BodySchemas: - # body schemas - application_json = Client - pass +# body schemas +application_json = AllofWithTwoEmptySchemas @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..656d22dc6e4 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AnyofComplexTypes + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) 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/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/response_for_200/__init__.py similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200.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/response_for_200/__init__.py index 90561be6384..7aff13e0092 100644 --- 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/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/response_for_200/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,20 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 +from unit_test_api.model.anyof import Anyof -class BodySchemas: - # body schemas - application_json = schemas.AnyTypeSchema - pass +# body schemas +application_json = Anyof @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -35,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..d231f9b6665 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AnyofWithBaseSchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..483778a707e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = AnyofWithOneEmptySchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..33364035e57 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = ArrayTypeMatchesArrays + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..011a11b2849 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = BooleanTypeMatchesBooleans + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) 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/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/response_for_200/__init__.py similarity index 71% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200.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/response_for_200/__init__.py index 90561be6384..7788843d3f4 100644 --- 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/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/response_for_200/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,20 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # 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 = schemas.AnyTypeSchema - pass +# body schemas +application_json = ByInt @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -35,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..6899a519f6e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = ByNumber + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..cfbedb0bd78 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = BySmallNumber + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..dc553a97708 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = DateTimeFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..e3b8a53ed14 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EmailFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..b143e6eca67 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EnumWith0DoesNotMatchFalse + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..97cd77bdb5b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EnumWith1DoesNotMatchTrue + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..9a0819dcc44 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EnumWithEscapedCharacters + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..e1607146781 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EnumWithFalseDoesNotMatch0 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..bb705c82c7e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EnumWithTrueDoesNotMatch1 + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..18a9f786a8d --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = EnumsInProperties + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..f5a7e0b0595 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = ForbiddenProperty + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..db307627a22 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = HostnameFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..df87b19e9fa --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = IntegerTypeMatchesIntegers + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) 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/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/__init__.py similarity index 62% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200.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/response_for_200/__init__.py index e7869c57801..090981ddf48 100644 --- 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/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,22 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - -class BodySchemas: - # body schemas - application_json = AdditionalPropertiesWithArrayOfEnums - pass +# body schemas +application_json = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..ff57c5bdef5 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = InvalidStringValueForDefault + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..df8bc6a18a4 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = Ipv4Format + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..7a729d2e77a --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = Ipv6Format + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..c1157a67bad --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = JsonPointerFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..3d66e730eb2 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MaximumValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..e4520f7135c --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MaximumValidationWithUnsignedInteger + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..5591204ea39 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MaxitemsValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..8a1519dc18a --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MaxlengthValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..aad5de54a9e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = Maxproperties0MeansTheObjectIsEmpty + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..77726e6909c --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MaxpropertiesValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..dfb512fee0c --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MinimumValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..573cdc31bfc --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MinimumValidationWithSignedInteger + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..0496ad741cd --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MinitemsValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..042040bd95c --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MinlengthValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..938daa299ed --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = MinpropertiesValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..952925c811b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NestedAllofToCheckValidationSemantics + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..26aac0e5f88 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NestedAnyofToCheckValidationSemantics + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..eececd794e6 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NestedItems + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..d38d9aa466a --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NestedOneofToCheckValidationSemantics + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__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/response_for_200/__init__.py new file mode 100644 index 00000000000..02cbd8c44f8 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NotMoreComplexSchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..7453435d0d8 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = ModelNot + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..948374f1d9d --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NulCharactersInStrings + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..ddbc2a32fc4 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NullTypeMatchesOnlyTheNullObject + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..df1d5b7eb5b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = NumberTypeMatchesNumbers + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..58b529a654e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = ObjectPropertiesValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..cb105d343c3 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = ObjectTypeMatchesObjects + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..0d732143355 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = OneofComplexTypes + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..3912c634e35 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = Oneof + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..0af6e0f9c3f --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = OneofWithBaseSchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..d3c8e44bbd8 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = OneofWithEmptySchema + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..7ec04280d0d --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = OneofWithRequired + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..e5b8ee6b97b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = PatternIsNotAnchored + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..f7bf241cd88 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = PatternValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..18e683df1db --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = PropertiesWithEscapedCharacters + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..eeeb78df96b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = PropertyNamedRefThatIsNotAReference + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/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/__init__.py similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200.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/response_for_200/__init__.py index d54e97d5447..210a28b4e42 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/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/__init__.py @@ -1,7 +1,7 @@ import dataclasses import urllib3 -from petstore_api import api_client +from unit_test_api import api_client from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 @@ -13,22 +13,19 @@ import frozendict # noqa: F401 -from petstore_api import schemas # noqa: F401 +from unit_test_api import schemas # noqa: F401 -from petstore_api.model.client import Client +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties - -class BodySchemas: - # body schemas - application_json = Client - pass +# body schemas +application_json = RefInAdditionalproperties @dataclasses.dataclass class ApiResponse(api_client.ApiResponse): response: urllib3.HTTPResponse body: typing.Union[ - BodySchemas.application_json, + application_json, ] headers: schemas.Unset = schemas.unset @@ -37,7 +34,7 @@ class ApiResponse(api_client.ApiResponse): response_cls=ApiResponse, content={ 'application/json': api_client.MediaType( - schema=BodySchemas.application_json, + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..375585fb3b9 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RefInAllof + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..a8167fc2719 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RefInAnyof + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..b798000913e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RefInItems + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__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/response_for_200/__init__.py new file mode 100644 index 00000000000..82a7bbd1dff --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RefInNot + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..d5fb89739cf --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RefInOneof + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..f92f3e72365 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RefInProperty + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..5bc849ed73b --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RequiredDefaultValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..80cc4fc1db5 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RequiredValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..a2eb440f37e --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RequiredWithEmptyArray + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__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/response_for_200/__init__.py new file mode 100644 index 00000000000..3eea19e42e6 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = RequiredWithEscapedCharacters + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..59b2034507d --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = SimpleEnumValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..2beb495d3e6 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = StringTypeMatchesStrings + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..b74e0e6eb02 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..676d8e843d0 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = UniqueitemsFalseValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..3ade56fb257 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = UniqueitemsValidation + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..4706c452b82 --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = UriFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..ca7ab14181f --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = UriReferenceFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=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/response_for_200/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/response_for_200/__init__.py new file mode 100644 index 00000000000..9ab96d2c12c --- /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/__init__.py @@ -0,0 +1,40 @@ +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 + +# body schemas +application_json = UriTemplateFormat + + +@dataclasses.dataclass +class ApiResponse(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + application_json, + ] + headers: schemas.Unset = schemas.unset + + +response = api_client.OpenApiResponse( + response_cls=ApiResponse, + content={ + 'application/json': api_client.MediaType( + schema=application_json, + ), + }, +) 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 35977ee2192..19f16b8c318 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md @@ -75,10 +75,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#call_123_test_special_tags.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#call_123_test_special_tags.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 b5429ec3839..3f600f43f62 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md @@ -49,10 +49,10 @@ default | [response_for_default.ApiResponse](#foo_get.response_for_default.ApiRe Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_0.BodySchemas.application_json](#foo_get.response_for_0.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_0.application_json](#foo_get.response_for_0.application_json), ] | | headers | Unset | headers were not defined | -# response_for_0.BodySchemas.application_json +# response_for_0.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 a3e7baa036a..b760aa861c1 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -107,10 +107,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#additional_properties_with_array_of_enums.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#additional_properties_with_array_of_enums.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | @@ -188,10 +188,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#array_model.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#array_model.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**AnimalFarm**](../../models/AnimalFarm.md) | | @@ -269,10 +269,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#array_of_enums.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#array_of_enums.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | @@ -529,10 +529,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#boolean.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#boolean.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Boolean**](../../models/Boolean.md) | | @@ -708,10 +708,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#client_model.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#client_model.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Client**](../../models/Client.md) | | @@ -787,10 +787,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#composed_one_of_different_types.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#composed_one_of_different_types.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | @@ -924,15 +924,68 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example, this endpoint has no required or optional parameters + # example passing only optional values + body = dict( + integer=10, + int32=20, + int64=1, + number=32.1, + _float=3.14, + double=67.8, + string="a", + pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", + byte='YQ==', + binary=open('/path/to/file', 'rb'), + date="1970-01-01", + date_time="2020-02-02T20:20:20.222220Z", + password="password_example", + callback="callback_example", + ) try: # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_response = api_instance.endpoint_parameters() + api_response = api_instance.endpoint_parameters( + body=body, + ) except petstore_api.ApiException as e: print("Exception when calling FakeApi->endpoint_parameters: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +[body](#endpoint_parameters.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#endpoint_parameters.request_body.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 + +# request_body.application_x_www_form_urlencoded + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**number** | decimal.Decimal, int, float, | decimal.Decimal, | None | +**pattern_without_delimiter** | str, | str, | None | +**byte** | str, | str, | None | +**double** | decimal.Decimal, int, float, | decimal.Decimal, | None | value must be a 64 bit float +**integer** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] +**int32** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] value must be a 32 bit integer +**int64** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] value must be a 64 bit integer +**float** | decimal.Decimal, int, float, | decimal.Decimal, | None | [optional] value must be a 32 bit float +**string** | str, | str, | None | [optional] +**binary** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | None | [optional] +**date** | str, date, | str, | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD +**dateTime** | str, datetime, | str, | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.11111+01:00value must conform to RFC-3339 date-time +**password** | str, | str, | None | [optional] +**callback** | str, | str, | None | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] ### Return Types, Responses @@ -1001,11 +1054,18 @@ with petstore_api.ApiClient(configuration) as api_client: ], 'enum_header_string': "-efg", } + body = dict( + enum_form_string_array=[ + "$" + ], + enum_form_string="-efg", + ) try: # To test enum parameters api_response = api_instance.enum_parameters( query_params=query_params, header_params=header_params, + body=body, ) except petstore_api.ApiException as e: print("Exception when calling FakeApi->enum_parameters: %s\n" % e) @@ -1014,12 +1074,44 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +[body](#enum_parameters.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#enum_parameters.request_body.application_x_www_form_urlencoded), Unset] | optional, default is unset | [query_params](#enum_parameters.RequestQueryParameters) | [RequestQueryParameters.Params](#enum_parameters.RequestQueryParameters.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 skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### body + +# request_body.application_x_www_form_urlencoded + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[enum_form_string_array](#enum_form_string_array)** | list, tuple, | tuple, | Form parameter enum test (string array) | [optional] +**enum_form_string** | str, | str, | Form parameter enum test (string) | [optional] must be one of ["_abc", "-efg", "(xyz)", ] if omitted the server will use the default value of "-efg" +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# enum_form_string_array + +Form parameter enum test (string array) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Form parameter enum test (string array) | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | must be one of [">", "$", ] if omitted the server will use the default value of "$" + ### query_params #### RequestQueryParameters.Params @@ -1163,10 +1255,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#fake_health_get.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#fake_health_get.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**HealthCheckResult**](../../models/HealthCheckResult.md) | | @@ -1598,10 +1690,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_json](#inline_composition.response_for_200.application_json), [response_for_200.multipart_form_data](#inline_composition.response_for_200.multipart_form_data), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1621,7 +1713,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# response_for_200.BodySchemas.multipart_form_data +# response_for_200.multipart_form_data ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1682,15 +1774,44 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example, this endpoint has no required or optional parameters + # example passing only optional values + body = dict( + param="param_example", + param2="param2_example", + ) try: # test json serialization of form data - api_response = api_instance.json_form_data() + api_response = api_instance.json_form_data( + body=body, + ) except petstore_api.ApiException as e: print("Exception when calling FakeApi->json_form_data: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +[body](#json_form_data.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#json_form_data.request_body.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 + +# request_body.application_x_www_form_urlencoded + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**param** | str, | str, | field1 | +**param2** | str, | str, | field2 | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] ### Return Types, Responses @@ -1851,10 +1972,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json_charsetutf_8](#json_with_charset.response_for_200.BodySchemas.application_json_charsetutf_8), ] | | +body | typing.Union[[response_for_200.application_json_charsetutf_8](#json_with_charset.response_for_200.application_json_charsetutf_8), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json_charsetutf_8 +# response_for_200.application_json_charsetutf_8 ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1935,10 +2056,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#mammal.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#mammal.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Mammal**](../../models/Mammal.md) | | @@ -2014,10 +2135,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#number_with_validations.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#number_with_validations.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**NumberWithValidations**](../../models/NumberWithValidations.md) | | @@ -2183,10 +2304,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#object_model_with_ref_props.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#object_model_with_ref_props.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | @@ -2500,10 +2621,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#parameter_collisions.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#parameter_collisions.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2580,10 +2701,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#query_param_with_json_content_type.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#query_param_with_json_content_type.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -2911,7 +3032,7 @@ with petstore_api.ApiClient(configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = String("body_example") + body = String("parameter_body_example") try: api_response = api_instance.string( body=body, @@ -2950,10 +3071,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#string.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#string.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**String**](../../models/String.md) | | @@ -3029,10 +3150,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#string_enum.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#string_enum.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**StringEnum**](../../models/StringEnum.md) | | @@ -3110,10 +3231,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_octet_stream](#upload_download_file.response_for_200.BodySchemas.application_octet_stream), ] | | +body | typing.Union[[response_for_200.application_octet_stream](#upload_download_file.response_for_200.application_octet_stream), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_octet_stream +# response_for_200.application_octet_stream file to download @@ -3150,16 +3271,46 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example, this endpoint has no required or optional parameters + # example passing only optional values + body = dict( + additional_metadata="additional_metadata_example", + file=open('/path/to/file', 'rb'), + ) try: # uploads a file using multipart/form-data - api_response = api_instance.upload_file() + api_response = api_instance.upload_file( + body=body, + ) pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_file: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +[body](#upload_file.request_body) | typing.Union[[request_body.multipart_form_data](#upload_file.request_body.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 + +# request_body.multipart_form_data + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | +**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] ### Return Types, Responses @@ -3172,10 +3323,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_file.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#upload_file.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.md) | | @@ -3209,16 +3360,58 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - # example, this endpoint has no required or optional parameters + # example passing only optional values + body = dict( + files=[ + open('/path/to/file', 'rb') + ], + ) try: # uploads files using multipart/form-data - api_response = api_instance.upload_files() + api_response = api_instance.upload_files( + body=body, + ) pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_files: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +[body](#upload_files.request_body) | typing.Union[[request_body.multipart_form_data](#upload_files.request_body.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 + +# request_body.multipart_form_data + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[files](#files)** | list, tuple, | tuple, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# files + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | ### Return Types, Responses @@ -3231,10 +3424,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_files.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#upload_files.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 70ab394877f..d30402fa79b 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md @@ -86,10 +86,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#classname.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#classname.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 c57b08665f0..be13b967fd8 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -465,10 +465,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_xml](#find_pets_by_status.response_for_200.application_xml), [response_for_200.application_json](#find_pets_by_status.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -480,7 +480,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -657,10 +657,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_xml](#find_pets_by_tags.response_for_200.application_xml), [response_for_200.application_json](#find_pets_by_tags.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -672,7 +672,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -782,16 +782,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_xml](#get_pet_by_id.response_for_200.application_xml), [response_for_200.application_json](#get_pet_by_id.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Pet**](../../models/Pet.md) | | @@ -1043,16 +1043,51 @@ with petstore_api.ApiClient(configuration) as api_client: ) except petstore_api.ApiException as e: print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + body = dict( + name="name_example", + status="status_example", + ) + try: + # Updates a pet in the store with form data + api_response = api_instance.update_pet_with_form( + path_params=path_params, + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +[body](#update_pet_with_form.request_body) | typing.Union[[request_body.application_x_www_form_urlencoded](#update_pet_with_form.request_body.application_x_www_form_urlencoded), Unset] | optional, default is unset | [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 skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### body + +# request_body.application_x_www_form_urlencoded + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**name** | str, | str, | Updated name of the pet | [optional] +**status** | str, | str, | Updated status of the pet | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + ### path_params #### RequestPathParameters.Params @@ -1132,17 +1167,53 @@ with petstore_api.ApiClient(configuration) as api_client: pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + body = dict( + additional_metadata="additional_metadata_example", + required_file=open('/path/to/file', 'rb'), + ) + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file( + path_params=path_params, + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +[body](#upload_file_with_required_file.request_body) | typing.Union[[request_body.multipart_form_data](#upload_file_with_required_file.request_body.multipart_form_data), Unset] | optional, default is unset | [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 timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### body + +# request_body.multipart_form_data + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**requiredFile** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | +**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + ### path_params #### RequestPathParameters.Params @@ -1168,10 +1239,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_file_with_required_file.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#upload_file_with_required_file.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**ApiResponse**](../../models/ApiResponse.md) | | @@ -1228,17 +1299,53 @@ with petstore_api.ApiClient(configuration) as api_client: pprint(api_response) except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_image: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + body = dict( + additional_metadata="additional_metadata_example", + file=open('/path/to/file', 'rb'), + ) + try: + # uploads an image + api_response = api_instance.upload_image( + path_params=path_params, + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_image: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +[body](#upload_image.request_body) | typing.Union[[request_body.multipart_form_data](#upload_image.request_body.multipart_form_data), Unset] | optional, default is unset | [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 timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### body + +# request_body.multipart_form_data + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] +**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + ### path_params #### RequestPathParameters.Params @@ -1264,10 +1371,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#upload_image.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#upload_image.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.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 51e0bfca4bf..e90ac70ae30 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -154,10 +154,10 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[[response_for_200.BodySchemas.application_json](#get_inventory.response_for_200.BodySchemas.application_json), ] | | +body | typing.Union[[response_for_200.application_json](#get_inventory.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -249,16 +249,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_xml](#get_order_by_id.response_for_200.application_xml), [response_for_200.application_json](#get_order_by_id.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | @@ -356,16 +356,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_xml](#place_order.response_for_200.application_xml), [response_for_200.application_json](#place_order.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**Order**](../../models/Order.md) | | -# response_for_200.BodySchemas.application_json +# response_for_200.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 eef84ebd141..3ac31e2d25e 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -446,16 +446,16 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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), ] | | +body | typing.Union[[response_for_200.application_xml](#get_user_by_name.response_for_200.application_xml), [response_for_200.application_json](#get_user_by_name.response_for_200.application_json), ] | | headers | Unset | headers were not defined | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json Type | Description | Notes ------------- | ------------- | ------------- [**User**](../../models/User.md) | | @@ -562,44 +562,43 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -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 | | +body | typing.Union[[response_for_200.application_xml](#login_user.response_for_200.application_xml), [response_for_200.application_json](#login_user.response_for_200.application_json), ] | | +headers | [response_for_200.Headers](#login_user.response_for_200.Headers) | | -# response_for_200.BodySchemas.application_xml +# response_for_200.application_xml ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# response_for_200.BodySchemas.application_json +# response_for_200.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -#### ResponseHeadersFor200 +#### response_for_200.Headers -Name | Type | Description | Notes +Key | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -X-Rate-Limit | schema | | optional -X-Expires-After | schema | | optional +X-Rate-Limit | [response_for_200.parameter_x_rate_limit.application_json](#login_user.response_for_200.parameter_x_rate_limit.application_json) | | optional +X-Expires-After | [response_for_200.parameter_x_expires_after.schema](#login_user.response_for_200.parameter_x_expires_after.schema) | | optional -# schema +# response_for_200.parameter_x_rate_limit.application_json ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- decimal.Decimal, int, | decimal.Decimal, | | value must be a 32 bit integer -# schema +# response_for_200.parameter_x_expires_after.schema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, datetime, | str, | | value must conform to RFC-3339 date-time - #### response_for_400.ApiResponse Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- 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 fe3a2815482..fc580cfeb6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -325,6 +325,18 @@ def _serialize_simple( prefix_separator_iterator=prefix_separator_iterator ) + def _deserialize_simple( + self, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + class JSONDetector: """ @@ -763,6 +775,27 @@ def serialize( return self.__to_headers(((name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + def deserialize( + self, + in_data: str, + name: str + ) -> Schema: + if self.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + extracted_data = self._deserialize_simple(in_data, name, self.explode, False) + return schema.from_openapi_data_oapg(extracted_data) + # self.content will be length one + for content_type, schema in self.content.items(): + if self._content_type_is_json(content_type): + cast_in_data = json.loads(in_data) + return schema.from_openapi_data_oapg(cast_in_data) + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + class HeaderParameter(HeaderParameterWithoutName): name: str @@ -782,7 +815,6 @@ def __init__( raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.name = name super().__init__( - in_type=ParameterInType.HEADER, required=required, style=style, explode=explode, @@ -836,13 +868,13 @@ class MediaType: class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] - headers: typing.Union[Unset, typing.List[HeaderParameter]] + headers: typing.Union[Unset, typing.Dict[str, Schema]] def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]] = unset, - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -855,18 +887,63 @@ def __init__( @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + +class TypedDictInputVerifier: + @staticmethod + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): + """ + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes + """ + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) -class OpenApiResponse(JSONDetector): + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) + + +class OpenApiResponse(JSONDetector, TypedDictInputVerifier): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') def __init__( self, response_cls: typing.Type[ApiResponse] = ApiResponse, content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, + headers: typing.Optional[typing.Dict[str, HeaderParameterWithoutName]] = None, ): self.headers = headers if content is not None and len(content) == 0: @@ -956,8 +1033,14 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati deserialized_headers = unset if self.headers is not None: - # TODO add header deserialiation here - pass + self._verify_typed_dict_inputs_oapg(self.response_cls.headers, response.headers) + deserialized_headers = {} + for header_name, header_param in self.headers.items(): + header_value = response.getheader(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value if self.content is not None: if content_type not in self.content: @@ -1302,7 +1385,7 @@ def update_params_for_auth(self, headers, auth_settings, ) -class Api: +class Api(TypedDictInputVerifier): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -1314,49 +1397,6 @@ def __init__(self, api_client: typing.Optional[ApiClient] = None): api_client = ApiClient() self.api_client = api_client - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - def _get_host_oapg( self, operation_id: str, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py deleted file mode 100644 index b8a9c1ef20b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - - -application_json = Client - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py index 9a784934a3f..308512db1d6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.client import Client - # body schemas application_json = Client diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py index 86cb00fb098..0b4cd304097 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_0.py @@ -34,4 +34,4 @@ schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py index aee1f622f9a..83ed58bad42 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_1.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py index 88ad9d94fe3..2311740e048 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_2.py @@ -34,4 +34,4 @@ schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py index add557e857f..7eefe9fd3d0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_3.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py index 34bacb5d51b..977f5b9e013 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_4.py @@ -32,4 +32,4 @@ name="boolean_group", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py index dd78bf878ea..329a50aaf98 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete/parameter_5.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) 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 740a51c5b2d..33fb0236554 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 @@ -28,6 +28,7 @@ from .. import path from . import response_for_200 from . import response_for_404 +from . import request_body from . import parameter_0 from . import parameter_1 from . import parameter_2 @@ -100,6 +101,8 @@ 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[request_body.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, @@ -109,10 +112,27 @@ def _enum_parameters_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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, @@ -122,6 +142,8 @@ def _enum_parameters_oapg( @typing.overload def _enum_parameters_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -134,6 +156,8 @@ def _enum_parameters_oapg( def _enum_parameters_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -170,10 +194,21 @@ class instances _headers.extend(serialized_data) # TODO add cookie handling + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _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, ) @@ -199,6 +234,8 @@ class EnumParameters(BaseApi): @typing.overload def enum_parameters( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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, @@ -208,10 +245,27 @@ def enum_parameters( response_for_200.ApiResponse, ]: ... + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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, @@ -221,6 +275,8 @@ def enum_parameters( @typing.overload def enum_parameters( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -233,6 +289,8 @@ def enum_parameters( def enum_parameters( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -240,8 +298,10 @@ def enum_parameters( 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 @@ -254,6 +314,8 @@ class ApiForget(BaseApi): @typing.overload def get( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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, @@ -263,10 +325,27 @@ def get( response_for_200.ApiResponse, ]: ... + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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, @@ -276,6 +355,8 @@ def get( @typing.overload def get( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -288,6 +369,8 @@ def get( def get( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -295,8 +378,10 @@ def get( 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 index d49805026e8..b821d0541bc 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 @@ -27,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 +from . import request_body from . import parameter_0 from . import parameter_1 from . import parameter_2 @@ -94,6 +95,8 @@ 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[request_body.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, @@ -103,10 +106,27 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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, @@ -116,6 +136,8 @@ class BaseApi(api_client.Api): @typing.overload def _enum_parameters_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -128,6 +150,8 @@ class BaseApi(api_client.Api): def _enum_parameters_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -164,10 +188,21 @@ class BaseApi(api_client.Api): _headers.extend(serialized_data) # TODO add cookie handling + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _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, ) @@ -193,6 +228,8 @@ class EnumParameters(BaseApi): @typing.overload def enum_parameters( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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, @@ -202,10 +239,27 @@ class EnumParameters(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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, @@ -215,6 +269,8 @@ class EnumParameters(BaseApi): @typing.overload def enum_parameters( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -227,6 +283,8 @@ class EnumParameters(BaseApi): def enum_parameters( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -234,8 +292,10 @@ class EnumParameters(BaseApi): 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 @@ -248,6 +308,8 @@ class ApiForget(BaseApi): @typing.overload def get( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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, @@ -257,10 +319,27 @@ class ApiForget(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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, @@ -270,6 +349,8 @@ class ApiForget(BaseApi): @typing.overload def get( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -282,6 +363,8 @@ class ApiForget(BaseApi): def get( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -289,8 +372,10 @@ class ApiForget(BaseApi): 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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py index 51ba873e332..a9c5ab0f96a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_0.py @@ -74,4 +74,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: name="enum_header_string_array", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py index 889b882e424..af9500bc82d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_1.py @@ -57,4 +57,4 @@ def XYZ(cls): name="enum_header_string", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py index 9b7f38bc9cb..08e1749d866 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_2.py @@ -75,4 +75,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py index f740b97872c..139c3af0a6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_3.py @@ -58,4 +58,4 @@ def XYZ(cls): style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py index ad2a99a2e1e..fc63d9dfe54 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_4.py @@ -54,4 +54,4 @@ def NEGATIVE_2(cls): style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py index 31c3da09cea..7b951cc2c1f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_5.py @@ -54,4 +54,4 @@ def NEGATIVE_1_PT_2(cls): style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py deleted file mode 100644 index f60dd18d9cd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get/parameter_6.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/x-www-form-urlencoded": application_x_www_form_urlencoded, - }, -), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py deleted file mode 100644 index b8a9c1ef20b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - - -application_json = Client - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py index 9a784934a3f..308512db1d6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.client import Client - # body schemas application_json = Client 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 index 77b66652538..1667278108e 100644 --- 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 @@ -9,6 +9,7 @@ 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 @@ -27,6 +28,7 @@ from .. import path from . import response_for_200 from . import response_for_404 +from . import request_body _auth = [ @@ -43,6 +45,8 @@ 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[request_body.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] = ..., @@ -50,10 +54,25 @@ def _endpoint_parameters_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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: ... @@ -61,6 +80,8 @@ def _endpoint_parameters_oapg( @typing.overload def _endpoint_parameters_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -71,6 +92,8 @@ def _endpoint_parameters_oapg( def _endpoint_parameters_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -82,11 +105,25 @@ def _endpoint_parameters_oapg( 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -113,6 +150,20 @@ class EndpointParameters(BaseApi): @typing.overload def endpoint_parameters( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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[request_body.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] = ..., @@ -120,10 +171,13 @@ def endpoint_parameters( response_for_200.ApiResponse, ]: ... + @typing.overload def endpoint_parameters( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -131,6 +185,8 @@ def endpoint_parameters( @typing.overload def endpoint_parameters( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -141,11 +197,15 @@ def endpoint_parameters( def endpoint_parameters( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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 @@ -158,6 +218,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., @@ -165,10 +227,25 @@ def post( response_for_200.ApiResponse, ]: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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: ... @@ -176,6 +253,8 @@ def post( @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -186,11 +265,15 @@ def post( def post( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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 index 855fcbe2349..5dacc717956 100644 --- 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 @@ -9,6 +9,7 @@ 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 @@ -26,6 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import response_for_200 from . import response_for_404 +from . import request_body @@ -33,6 +35,8 @@ 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[request_body.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] = ..., @@ -40,10 +44,25 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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: ... @@ -51,6 +70,8 @@ class BaseApi(api_client.Api): @typing.overload def _endpoint_parameters_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -61,6 +82,8 @@ class BaseApi(api_client.Api): def _endpoint_parameters_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -72,11 +95,25 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -103,6 +140,20 @@ class EndpointParameters(BaseApi): @typing.overload def endpoint_parameters( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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[request_body.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] = ..., @@ -110,10 +161,13 @@ class EndpointParameters(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload def endpoint_parameters( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -121,6 +175,8 @@ class EndpointParameters(BaseApi): @typing.overload def endpoint_parameters( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -131,11 +187,15 @@ class EndpointParameters(BaseApi): def endpoint_parameters( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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 @@ -148,6 +208,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., @@ -155,10 +217,25 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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[request_body.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: ... @@ -166,6 +243,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -176,11 +255,15 @@ class ApiForpost(BaseApi): def post( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py deleted file mode 100644 index 2b7dce9b59c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/parameter_0.py +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -class 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_oapg = api_client.Parameter( - name="body", - content={ - "application/x-www-form-urlencoded": application_x_www_form_urlencoded, - }, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py deleted file mode 100644 index 3059b4ffa6c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums - - -application_json = AdditionalPropertiesWithArrayOfEnums - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py index b8186c509ff..27c4dc6e814 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums - # body schemas application_json = AdditionalPropertiesWithArrayOfEnums diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py deleted file mode 100644 index 84a22922402..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.file_schema_test_class import FileSchemaTestClass - - -application_json = FileSchemaTestClass - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py index 14b4cceea38..8734149176f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_0.py @@ -36,4 +36,4 @@ schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py deleted file mode 100644 index 8b6b93f5436..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/parameter_1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - - -application_json = User - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py index 7c85255f1f2..4d276b5143b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_0.py @@ -34,4 +34,4 @@ schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py index b1a857aa046..3e9d02d2a4e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_1.py @@ -34,4 +34,4 @@ schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py index b36ff3bd622..0628c46dfe0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/parameter_2.py @@ -34,4 +34,4 @@ schema=schema, required=True, explode=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py deleted file mode 100644 index b8a9c1ef20b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - - -application_json = Client - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py index 9a784934a3f..308512db1d6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.client import Client - # body schemas application_json = Client diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py index 78c82fea555..c5955641be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete/response_for_default.py +++ /dev/null @@ -1,28 +0,0 @@ -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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py index 356474e1849..ffba45dfcfb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.health_check_result import HealthCheckResult - # body schemas application_json = HealthCheckResult diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py deleted file mode 100644 index d5fd48475fd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/parameter_0.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py index 2336d255e86..a11da6c079f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_0.py @@ -77,4 +77,4 @@ def __new__( style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py index 2d50755b405..31cdee21685 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_1.py @@ -126,4 +126,4 @@ def __new__( style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py deleted file mode 100644 index 6b2e40f719e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/parameter_2.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - "multipart/form-data": multipart_form_data, - }, -), 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 deleted file mode 100644 index 73ccd674578..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200.py +++ /dev/null @@ -1,183 +0,0 @@ -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_inline_composition_/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py index 29476bfdf47..a409cb331c6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py index 3a672dde2b9..e4aabfad0b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.py @@ -9,6 +9,7 @@ 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 @@ -26,6 +27,7 @@ from .. import path from . import response_for_200 +from . import request_body _status_code_to_response = { @@ -37,6 +39,8 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data_oapg( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., @@ -44,10 +48,25 @@ def _json_form_data_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _json_form_data_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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 _json_form_data_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -55,6 +74,8 @@ def _json_form_data_oapg( @typing.overload def _json_form_data_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -65,6 +86,8 @@ def _json_form_data_oapg( def _json_form_data_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -76,11 +99,25 @@ def _json_form_data_oapg( 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _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, ) @@ -106,6 +143,20 @@ class JsonFormData(BaseApi): @typing.overload def json_form_data( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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 json_form_data( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., @@ -113,10 +164,13 @@ def json_form_data( response_for_200.ApiResponse, ]: ... + @typing.overload def json_form_data( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -124,6 +178,8 @@ def json_form_data( @typing.overload def json_form_data( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -134,11 +190,15 @@ def json_form_data( def json_form_data( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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._json_form_data_oapg( + body=body, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -151,6 +211,8 @@ class ApiForget(BaseApi): @typing.overload def get( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., @@ -158,10 +220,25 @@ def get( response_for_200.ApiResponse, ]: ... + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[request_body.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 get( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -169,6 +246,8 @@ def get( @typing.overload def get( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -179,11 +258,15 @@ def get( def get( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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._json_form_data_oapg( + body=body, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi index 107b6fbf6e0..b127066bed7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/__init__.pyi @@ -9,6 +9,7 @@ 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 @@ -25,6 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import request_body @@ -32,6 +34,8 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data_oapg( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., @@ -39,10 +43,25 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _json_form_data_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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 _json_form_data_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -50,6 +69,8 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -60,6 +81,8 @@ class BaseApi(api_client.Api): def _json_form_data_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -71,11 +94,25 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _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, ) @@ -101,6 +138,20 @@ class JsonFormData(BaseApi): @typing.overload def json_form_data( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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 json_form_data( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., @@ -108,10 +159,13 @@ class JsonFormData(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload def json_form_data( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -119,6 +173,8 @@ class JsonFormData(BaseApi): @typing.overload def json_form_data( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -129,11 +185,15 @@ class JsonFormData(BaseApi): def json_form_data( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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._json_form_data_oapg( + body=body, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -146,6 +206,8 @@ class ApiForget(BaseApi): @typing.overload def get( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., @@ -153,10 +215,25 @@ class ApiForget(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[request_body.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 get( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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: ... @@ -164,6 +241,8 @@ class ApiForget(BaseApi): @typing.overload def get( self, + content_type: str = ..., + body: typing.Union[request_body.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 = ..., @@ -174,11 +253,15 @@ class ApiForget(BaseApi): def get( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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._json_form_data_oapg( + body=body, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py deleted file mode 100644 index f03c1800073..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/parameter_0.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/x-www-form-urlencoded": application_x_www_form_urlencoded, - }, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py deleted file mode 100644 index b6ce89f605d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.json_patch_request import JSONPatchRequest - - -application_json_patchjson = JSONPatchRequest - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json-patch+json": application_json_patchjson, - }, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py deleted file mode 100644 index 37f2eae2318..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/parameter_0.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -application_json_charsetutf_8 = schemas.AnyTypeSchema - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json; charset=utf-8": application_json_charsetutf_8, - }, -), 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 deleted file mode 100644 index 7c80211b70e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200.py +++ /dev/null @@ -1,41 +0,0 @@ -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/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py index 3e9adccf83a..2e1b8e79d08 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas application_json_charsetutf_8 = schemas.AnyTypeSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py deleted file mode 100644 index 035b7c3bd98..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py +++ /dev/null @@ -1,305 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params - - -class MapBeanSchema( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - keyword = schemas.StrSchema - __annotations__ = { - "keyword": keyword, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MapBeanSchema': - return super().__new__( - cls, - *args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mapBean': typing.Union[MapBeanSchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _object_in_query_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class ObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def object_in_query( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi deleted file mode 100644 index ddfcbed6217..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params - - -class MapBeanSchema( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - keyword = schemas.StrSchema - __annotations__ = { - "keyword": keyword, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MapBeanSchema': - return super().__new__( - cls, - *args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mapBean': typing.Union[MapBeanSchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _object_in_query_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class ObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def object_in_query( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py index df7c6fd1f6e..12a2f280a81 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/parameter_0.py @@ -82,4 +82,4 @@ def __new__( style=api_client.ParameterStyle.DEEP_OBJECT, schema=schema, explode=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py index 9269b212128..bfa99536e4f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py index fba4d5802ba..3e483df9af4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_1.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py index 21be71ad794..5b4e5861f8f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_10.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py index b6234e65d04..fe3dd4a2d52 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_11.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py index 3d4d0e4cdb5..ea63a1688a7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_12.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py index 2e7e164fb3b..35ede4f74c7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_13.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py index 81a597f47d8..a008915479c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_14.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py index bca25b3e3b1..75697158f07 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_15.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py index bd3479828f0..0fda815fe03 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_16.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py index 077d608aa53..191f61e7962 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_17.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py index beaa5ffe8c1..44f0e3bca92 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_18.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_19.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_19.py deleted file mode 100644 index 22e8caf2783..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_19.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -application_json = schemas.AnyTypeSchema - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py index 8ffbc18bf6e..95a6abad63a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_2.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py index 811565caf05..c9c2ad3196d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_3.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py index 73a475d20de..67868191c4a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_4.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.FORM, schema=schema, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py index 864fbf20697..7ac716cf6b7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_5.py @@ -32,4 +32,4 @@ name="1", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py index 31bcdea5576..2defa744450 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_6.py @@ -32,4 +32,4 @@ name="aB", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py index 98cf429af66..4639e0a3582 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_7.py @@ -32,4 +32,4 @@ name="self", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py index 037663edb72..202cabeb6ad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_8.py @@ -32,4 +32,4 @@ name="A-B", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py index 4a94857a42e..204b63751cb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/parameter_9.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.py index 062d6dafa76..258417145ec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas application_json = schemas.AnyTypeSchema 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 515c1c99ff1..ba31496eef5 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 @@ -27,6 +27,7 @@ from .. import path from . import response_for_200 +from . import request_body from . import parameter_0 @@ -69,6 +70,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -78,10 +81,27 @@ def _upload_file_with_required_file_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_file_with_required_file_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_file_with_required_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -91,6 +111,8 @@ def _upload_file_with_required_file_oapg( @typing.overload def _upload_file_with_required_file_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -103,6 +125,8 @@ def _upload_file_with_required_file_oapg( def _upload_file_with_required_file_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -135,10 +159,21 @@ class instances 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -165,6 +200,8 @@ class UploadFileWithRequiredFile(BaseApi): @typing.overload def upload_file_with_required_file( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -174,10 +211,27 @@ def upload_file_with_required_file( response_for_200.ApiResponse, ]: ... + @typing.overload + def upload_file_with_required_file( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def upload_file_with_required_file( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -187,6 +241,8 @@ def upload_file_with_required_file( @typing.overload def upload_file_with_required_file( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -199,6 +255,8 @@ def upload_file_with_required_file( def upload_file_with_required_file( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -206,7 +264,9 @@ def upload_file_with_required_file( skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -220,6 +280,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -229,10 +291,27 @@ def post( response_for_200.ApiResponse, ]: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -242,6 +321,8 @@ def post( @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -254,6 +335,8 @@ def post( def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -261,7 +344,9 @@ def post( skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, 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 0a9b0570d33..8f0508538d9 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 @@ -26,6 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import request_body from . import parameter_0 @@ -60,6 +61,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -69,10 +72,27 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_file_with_required_file_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_file_with_required_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -82,6 +102,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -94,6 +116,8 @@ class BaseApi(api_client.Api): def _upload_file_with_required_file_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -126,10 +150,21 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -156,6 +191,8 @@ class UploadFileWithRequiredFile(BaseApi): @typing.overload def upload_file_with_required_file( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -165,10 +202,27 @@ class UploadFileWithRequiredFile(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def upload_file_with_required_file( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def upload_file_with_required_file( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -178,6 +232,8 @@ class UploadFileWithRequiredFile(BaseApi): @typing.overload def upload_file_with_required_file( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -190,6 +246,8 @@ class UploadFileWithRequiredFile(BaseApi): def upload_file_with_required_file( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -197,7 +255,9 @@ class UploadFileWithRequiredFile(BaseApi): skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -211,6 +271,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -220,10 +282,27 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -233,6 +312,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -245,6 +326,8 @@ class ApiForpost(BaseApi): def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -252,7 +335,9 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ): return self._upload_file_with_required_file_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py index 236cf812790..647a5eeffa0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py deleted file mode 100644 index c88ac2fcb80..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameter_1.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "multipart/form-data": multipart_form_data, - }, -), 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 deleted file mode 100644 index 55c94e2ea12..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py index 88e145120d7..b528d5f43fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.api_response import ApiResponse - # body schemas application_json = ApiResponse diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py index b33dd5b4fa3..a7d480e53ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/parameter_0.py @@ -34,4 +34,4 @@ "application/json": schema, }, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py index 062d6dafa76..258417145ec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas application_json = schemas.AnyTypeSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py index 9be1c863107..f1b7a2672f6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/parameter_0.py @@ -35,4 +35,4 @@ style=api_client.ParameterStyle.DEEP_OBJECT, schema=schema, explode=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py deleted file mode 100644 index adf443c65b9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.array_of_enums import ArrayOfEnums - - -application_json = ArrayOfEnums - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index 8bdb51cf3e8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_array_of_enums/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py index 0d9f76ca6c5..57f01198487 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.array_of_enums import ArrayOfEnums - # body schemas application_json = ArrayOfEnums diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py deleted file mode 100644 index 539fa47eba7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.animal_farm import AnimalFarm - - -application_json = AnimalFarm - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index bfca2008375..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_arraymodel/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py index 72e07262531..061c3f07740 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.animal_farm import AnimalFarm - # body schemas application_json = AnimalFarm diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py deleted file mode 100644 index d362f591300..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.boolean import Boolean - - -application_json = Boolean - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index ec533ef13b8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_boolean/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py index c6139cbccb2..f273b7670e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.boolean import Boolean - # body schemas application_json = Boolean diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py deleted file mode 100644 index 477668cb29f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes - - -application_json = ComposedOneOfDifferentTypes - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index fc2cae69019..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_composed_one_of_number_with_validations/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py index 7847d91ffdb..951063e173a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes - # body schemas application_json = ComposedOneOfDifferentTypes diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py deleted file mode 100644 index 072f48d9e5c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_enum import StringEnum - - -application_json = StringEnum - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index 65a3feee344..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_enum/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py index b6f1145f125..579e86800ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.string_enum import StringEnum - # body schemas application_json = StringEnum diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py deleted file mode 100644 index b93527d07fc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.mammal import Mammal - - -application_json = Mammal - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 2fd3e77ef58..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_mammal/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py index 7ca38bc3a98..6171fd8d173 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.mammal import Mammal - # body schemas application_json = Mammal diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py deleted file mode 100644 index 381854085f2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.number_with_validations import NumberWithValidations - - -application_json = NumberWithValidations - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index 9d27aded28f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_number/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py index fecc0a98577..06f004c9fec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.number_with_validations import NumberWithValidations - # body schemas application_json = NumberWithValidations diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py deleted file mode 100644 index 73455191a26..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps - - -application_json = ObjectModelWithRefProps - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index 24c4fa41ff6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_object_model_with_ref_props/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py index 1eef55a3eb0..3d897daf46d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps - # body schemas application_json = ObjectModelWithRefProps diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py deleted file mode 100644 index d7027fb9c67..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/parameter_0.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string import String - - -application_json = String - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, -), 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 deleted file mode 100644 index 084ff9dca08..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_refs_string/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py index 96293b6b39e..410274848e1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.string import String - # body schemas application_json = String diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py index d461ee5680a..35a2661f77c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py deleted file mode 100644 index 1384c49ad15..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py +++ /dev/null @@ -1,415 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_with_validation import StringWithValidation - -from . import path - -# Query params - - -class PipeSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'PipeSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class IoutilSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'IoutilSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class HttpSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'HttpSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class UrlSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'UrlSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class ContextSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ContextSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RefParamSchema = StringWithValidation -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'pipe': typing.Union[PipeSchema, list, tuple, ], - 'ioutil': typing.Union[IoutilSchema, list, tuple, ], - 'http': typing.Union[HttpSchema, list, tuple, ], - 'url': typing.Union[UrlSchema, list, tuple, ], - 'context': typing.Union[ContextSchema, list, tuple, ], - 'refParam': typing.Union[RefParamSchema, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_pipe = api_client.QueryParameter( - name="pipe", - style=api_client.ParameterStyle.FORM, - schema=PipeSchema, - required=True, - explode=True, -) -request_query_ioutil = api_client.QueryParameter( - name="ioutil", - style=api_client.ParameterStyle.FORM, - schema=IoutilSchema, - required=True, -) -request_query_http = api_client.QueryParameter( - name="http", - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=HttpSchema, - required=True, -) -request_query_url = api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=UrlSchema, - required=True, -) -request_query_context = api_client.QueryParameter( - name="context", - style=api_client.ParameterStyle.FORM, - schema=ContextSchema, - required=True, - explode=True, -) -request_query_ref_param = api_client.QueryParameter( - name="refParam", - style=api_client.ParameterStyle.FORM, - schema=RefParamSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_pipe, - request_query_ioutil, - request_query_http, - request_query_url, - request_query_context, - request_query_ref_param, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class QueryParameterCollectionFormat(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def query_parameter_collection_format( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi deleted file mode 100644 index 230c45c3ae1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi +++ /dev/null @@ -1,410 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_with_validation import StringWithValidation - -# Query params - - -class PipeSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'PipeSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class IoutilSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'IoutilSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class HttpSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'HttpSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class UrlSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'UrlSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class ContextSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ContextSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RefParamSchema = StringWithValidation -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'pipe': typing.Union[PipeSchema, list, tuple, ], - 'ioutil': typing.Union[IoutilSchema, list, tuple, ], - 'http': typing.Union[HttpSchema, list, tuple, ], - 'url': typing.Union[UrlSchema, list, tuple, ], - 'context': typing.Union[ContextSchema, list, tuple, ], - 'refParam': typing.Union[RefParamSchema, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_pipe = api_client.QueryParameter( - name="pipe", - style=api_client.ParameterStyle.FORM, - schema=PipeSchema, - required=True, - explode=True, -) -request_query_ioutil = api_client.QueryParameter( - name="ioutil", - style=api_client.ParameterStyle.FORM, - schema=IoutilSchema, - required=True, -) -request_query_http = api_client.QueryParameter( - name="http", - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=HttpSchema, - required=True, -) -request_query_url = api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=UrlSchema, - required=True, -) -request_query_context = api_client.QueryParameter( - name="context", - style=api_client.ParameterStyle.FORM, - schema=ContextSchema, - required=True, - explode=True, -) -request_query_ref_param = api_client.QueryParameter( - name="refParam", - style=api_client.ParameterStyle.FORM, - schema=RefParamSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_pipe, - request_query_ioutil, - request_query_http, - request_query_url, - request_query_context, - request_query_ref_param, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class QueryParameterCollectionFormat(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def query_parameter_collection_format( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py index b0a6040125f..0015a4d1bfe 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_0.py @@ -58,4 +58,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py index ee1140e3471..3de7262793c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_1.py @@ -57,4 +57,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: style=api_client.ParameterStyle.FORM, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py index 91d63f1d6a0..313173a8d8c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_2.py @@ -57,4 +57,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: style=api_client.ParameterStyle.SPACE_DELIMITED, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py index afdcefb4fc2..5b1b0e5cbdf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_3.py @@ -57,4 +57,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: style=api_client.ParameterStyle.FORM, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py index 8ad12fb46fe..60d37cde482 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_4.py @@ -58,4 +58,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py index 19a38317a45..65a1c0136eb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/parameter_5.py @@ -36,4 +36,4 @@ schema=schema, required=True, explode=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py deleted file mode 100644 index f327fd2c07b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/parameter_0.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -application_octet_stream = schemas.BinarySchema - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/octet-stream": application_octet_stream, - }, - required=True, -), 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 deleted file mode 100644 index d2427b782b5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200.py +++ /dev/null @@ -1,41 +0,0 @@ -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_download_file/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py index 7e6f643a28c..39af62e2e99 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas application_octet_stream = schemas.BinarySchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py index c8fe614c053..78a89109703 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.py @@ -27,6 +27,7 @@ from .. import path from . import response_for_200 +from . import request_body _status_code_to_response = { @@ -41,6 +42,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -49,10 +52,26 @@ def _upload_file_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_file_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -61,6 +80,8 @@ def _upload_file_oapg( @typing.overload def _upload_file_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -72,6 +93,8 @@ def _upload_file_oapg( def _upload_file_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -91,10 +114,21 @@ class instances 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, + fields=_fields, + body=_body, stream=stream, timeout=timeout, ) @@ -120,6 +154,21 @@ class UploadFile(BaseApi): @typing.overload def upload_file( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def upload_file( + self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -128,10 +177,13 @@ def upload_file( response_for_200.ApiResponse, ]: ... + @typing.overload def upload_file( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -140,6 +192,8 @@ def upload_file( @typing.overload def upload_file( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -151,12 +205,16 @@ def upload_file( def upload_file( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -170,6 +228,21 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -178,10 +251,13 @@ def post( response_for_200.ApiResponse, ]: ... + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -190,6 +266,8 @@ def post( @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -201,12 +279,16 @@ def post( def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi index 821d351eb6d..84512612a50 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/__init__.pyi @@ -26,6 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import request_body _all_accept_content_types = ( 'application/json', @@ -36,6 +37,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -44,10 +47,26 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_file_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_file_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -56,6 +75,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -67,6 +88,8 @@ class BaseApi(api_client.Api): def _upload_file_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -86,10 +109,21 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, + fields=_fields, + body=_body, stream=stream, timeout=timeout, ) @@ -115,6 +149,21 @@ class UploadFile(BaseApi): @typing.overload def upload_file( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def upload_file( + self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -123,10 +172,13 @@ class UploadFile(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload def upload_file( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -135,6 +187,8 @@ class UploadFile(BaseApi): @typing.overload def upload_file( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -146,12 +200,16 @@ class UploadFile(BaseApi): def upload_file( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -165,6 +223,21 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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,10 +246,13 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -185,6 +261,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -196,12 +274,16 @@ class ApiForpost(BaseApi): def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_file_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py deleted file mode 100644 index 2d2d23bec32..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/parameter_0.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "multipart/form-data": multipart_form_data, - }, -), 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 deleted file mode 100644 index 55c94e2ea12..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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_file/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py index 88e145120d7..b528d5f43fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.api_response import ApiResponse - # body schemas application_json = ApiResponse diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py index fd71d82c1d3..18952344aaf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.py @@ -27,6 +27,7 @@ from .. import path from . import response_for_200 +from . import request_body _status_code_to_response = { @@ -41,6 +42,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -49,10 +52,26 @@ def _upload_files_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_files_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_files_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -61,6 +80,8 @@ def _upload_files_oapg( @typing.overload def _upload_files_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -72,6 +93,8 @@ def _upload_files_oapg( def _upload_files_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -91,10 +114,21 @@ class instances 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, + fields=_fields, + body=_body, stream=stream, timeout=timeout, ) @@ -120,6 +154,21 @@ class UploadFiles(BaseApi): @typing.overload def upload_files( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def upload_files( + self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -128,10 +177,13 @@ def upload_files( response_for_200.ApiResponse, ]: ... + @typing.overload def upload_files( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -140,6 +192,8 @@ def upload_files( @typing.overload def upload_files( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -151,12 +205,16 @@ def upload_files( def upload_files( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -170,6 +228,21 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -178,10 +251,13 @@ def post( response_for_200.ApiResponse, ]: ... + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -190,6 +266,8 @@ def post( @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -201,12 +279,16 @@ def post( def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi index a8f34908c38..6ea2da353d5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/__init__.pyi @@ -26,6 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import request_body _all_accept_content_types = ( 'application/json', @@ -36,6 +37,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -44,10 +47,26 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_files_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_files_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -56,6 +75,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -67,6 +88,8 @@ class BaseApi(api_client.Api): def _upload_files_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -86,10 +109,21 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, method='post'.upper(), headers=_headers, + fields=_fields, + body=_body, stream=stream, timeout=timeout, ) @@ -115,6 +149,21 @@ class UploadFiles(BaseApi): @typing.overload def upload_files( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def upload_files( + self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -123,10 +172,13 @@ class UploadFiles(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload def upload_files( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -135,6 +187,8 @@ class UploadFiles(BaseApi): @typing.overload def upload_files( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -146,12 +200,16 @@ class UploadFiles(BaseApi): def upload_files( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -165,6 +223,21 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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,10 +246,13 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -185,6 +261,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -196,12 +274,16 @@ class ApiForpost(BaseApi): def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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 = False, ): return self._upload_files_oapg( + body=body, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py deleted file mode 100644 index 067cc471651..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/parameter_0.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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: ... - - @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], - ) -> 'multipart_form_data': - return super().__new__( - cls, - *args, - files=files, - _configuration=_configuration, - **kwargs, - ) - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "multipart/form-data": multipart_form_data, - }, -), 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 deleted file mode 100644 index 55c94e2ea12..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py index 88e145120d7..b528d5f43fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.api_response import ApiResponse - # body schemas application_json = ApiResponse diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py deleted file mode 100644 index e2d1fda9cf5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.foo import Foo - -from . import path - - - -class SchemaFor0ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - @staticmethod - def string() -> typing.Type['Foo']: - return Foo - __annotations__ = { - "string": string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> 'Foo': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union['Foo', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - string: typing.Union['Foo', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor0ResponseBodyApplicationJson': - return super().__new__( - cls, - *args, - string=string, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _foo_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class FooGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def foo_get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi deleted file mode 100644 index 9cfee5e76d1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ /dev/null @@ -1,285 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.foo import Foo - - - -class SchemaFor0ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - @staticmethod - def string() -> typing.Type['Foo']: - return Foo - __annotations__ = { - "string": string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> 'Foo': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union['Foo', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - string: typing.Union['Foo', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor0ResponseBodyApplicationJson': - return super().__new__( - cls, - *args, - string=string, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _foo_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class FooGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def foo_get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py deleted file mode 100644 index d403500ea4a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default.py +++ /dev/null @@ -1,95 +0,0 @@ -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/foo/get/response_for_default/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py index c2f4f43b454..d4bd653b1f9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get/response_for_default/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.foo import Foo - # body schemas diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py deleted file mode 100644 index b41d4bed4eb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/parameter_0.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - - -application_json = Pet -application_xml = Pet - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - "application/xml": application_xml, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post/response_for_405.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py deleted file mode 100644 index b41d4bed4eb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/parameter_0.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - - -application_json = Pet -application_xml = Pet - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - "application/xml": application_xml, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put/response_for_405.py +++ /dev/null @@ -1,28 +0,0 @@ -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.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py deleted file mode 100644 index 5b753a5bb5d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py +++ /dev/null @@ -1,409 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# Query params - - -class StatusSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "available": "AVAILABLE", - "pending": "PENDING", - "sold": "SOLD", - } - - @schemas.classproperty - def AVAILABLE(cls): - return cls("available") - - @schemas.classproperty - def PENDING(cls): - return cls("pending") - - @schemas.classproperty - def SOLD(cls): - return cls("sold") - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'StatusSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'status': typing.Union[StatusSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_status = api_client.QueryParameter( - name="status", - style=api_client.ParameterStyle.FORM, - schema=StatusSchema, - required=True, -) -_auth = [ - 'http_signature_test', - 'petstore_auth', -] - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_status, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class FindPetsByStatus(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_status( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi deleted file mode 100644 index 59b71f5fc19..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ /dev/null @@ -1,391 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# Query params - - -class StatusSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AVAILABLE(cls): - return cls("available") - - @schemas.classproperty - def PENDING(cls): - return cls("pending") - - @schemas.classproperty - def SOLD(cls): - return cls("sold") - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'StatusSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'status': typing.Union[StatusSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_status = api_client.QueryParameter( - name="status", - style=api_client.ParameterStyle.FORM, - schema=StatusSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_status, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class FindPetsByStatus(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_status( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py index c7c25288ae8..175548a663d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/parameter_0.py @@ -80,4 +80,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: style=api_client.ParameterStyle.FORM, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 149afb6194c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200.py +++ /dev/null @@ -1,98 +0,0 @@ -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py index 0f1ca7b827e..61af005a631 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.pet import Pet - # body schemas 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py deleted file mode 100644 index 4725d356cf4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py +++ /dev/null @@ -1,384 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# Query params - - -class TagsSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'TagsSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'tags': typing.Union[TagsSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_tags = api_client.QueryParameter( - name="tags", - style=api_client.ParameterStyle.FORM, - schema=TagsSchema, - required=True, -) -_auth = [ - 'http_signature_test', - 'petstore_auth', -] - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_tags, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class FindPetsByTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_tags( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi deleted file mode 100644 index e512a26f01a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ /dev/null @@ -1,374 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# Query params - - -class TagsSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'TagsSchema': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'tags': typing.Union[TagsSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_tags = api_client.QueryParameter( - name="tags", - style=api_client.ParameterStyle.FORM, - schema=TagsSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_tags, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class FindPetsByTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_tags( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py index 885aa2a1900..6b10a4d717c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/parameter_0.py @@ -55,4 +55,4 @@ def __getitem__(self, i: int) -> MetaOapg.items: style=api_client.ParameterStyle.FORM, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 149afb6194c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200.py +++ /dev/null @@ -1,98 +0,0 @@ -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py index 0f1ca7b827e..61af005a631 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.pet import Pet - # body schemas 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py index 6d45e4883ff..b7d62450486 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_0.py @@ -32,4 +32,4 @@ name="api_key", style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py index 236cf812790..647a5eeffa0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/parameter_1.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py index 236cf812790..647a5eeffa0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 632ed1944b6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200.py +++ /dev/null @@ -1,48 +0,0 @@ -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py index 9da36abc1c1..a52bdb92c9a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.pet import Pet - # body schemas application_xml = Pet application_json = Pet 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.py index ba8b62f5c3f..47b1087a6a7 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 @@ -9,6 +9,7 @@ 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 @@ -26,6 +27,7 @@ from .. import path from . import response_for_405 +from . import request_body from . import parameter_0 @@ -65,15 +67,30 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form_oapg( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_with_form_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _update_pet_with_form_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -82,6 +99,8 @@ def _update_pet_with_form_oapg( @typing.overload def _update_pet_with_form_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -92,6 +111,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[request_body.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, @@ -116,11 +137,25 @@ class instances for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() # TODO add cookie handling + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -147,15 +182,30 @@ class UpdatePetWithForm(BaseApi): @typing.overload def update_pet_with_form( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet_with_form( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def update_pet_with_form( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -164,6 +214,8 @@ def update_pet_with_form( @typing.overload def update_pet_with_form( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -174,13 +226,17 @@ def update_pet_with_form( def update_pet_with_form( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( + body=body, path_params=path_params, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -193,15 +249,30 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -210,6 +281,8 @@ def post( @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -220,13 +293,17 @@ def post( def post( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( + body=body, path_params=path_params, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/__init__.pyi index 7d0faabe835..246578f6352 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 @@ -9,6 +9,7 @@ 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 @@ -25,6 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_405 +from . import request_body from . import parameter_0 @@ -56,15 +58,30 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form_oapg( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_with_form_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _update_pet_with_form_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -73,6 +90,8 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -83,6 +102,8 @@ class BaseApi(api_client.Api): def _update_pet_with_form_oapg( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, @@ -107,11 +128,25 @@ class BaseApi(api_client.Api): for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() # TODO add cookie handling + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -138,15 +173,30 @@ class UpdatePetWithForm(BaseApi): @typing.overload def update_pet_with_form( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet_with_form( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def update_pet_with_form( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -155,6 +205,8 @@ class UpdatePetWithForm(BaseApi): @typing.overload def update_pet_with_form( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -165,13 +217,17 @@ class UpdatePetWithForm(BaseApi): def update_pet_with_form( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( + body=body, path_params=path_params, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -184,15 +240,30 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[request_body.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] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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] = ..., ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -201,6 +272,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -211,13 +284,17 @@ class ApiForpost(BaseApi): def post( self, + content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[request_body.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, ): return self._update_pet_with_form_oapg( + body=body, path_params=path_params, + content_type=content_type, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py index 236cf812790..647a5eeffa0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py deleted file mode 100644 index ae4f188e184..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/parameter_1.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/x-www-form-urlencoded": application_x_www_form_urlencoded, - }, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post/response_for_405.py +++ /dev/null @@ -1,28 +0,0 @@ -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/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py index 9fc6023aab1..af7a79eb441 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 @@ -27,6 +27,7 @@ from .. import path from . import response_for_200 +from . import request_body from . import parameter_0 @@ -69,6 +70,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -78,10 +81,27 @@ def _upload_image_oapg( response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_image_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_image_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -91,6 +111,8 @@ def _upload_image_oapg( @typing.overload def _upload_image_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -103,6 +125,8 @@ def _upload_image_oapg( def _upload_image_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -135,10 +159,21 @@ class instances 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -165,6 +200,8 @@ class UploadImage(BaseApi): @typing.overload def upload_image( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -174,10 +211,27 @@ def upload_image( response_for_200.ApiResponse, ]: ... + @typing.overload + def upload_image( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def upload_image( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -187,6 +241,8 @@ def upload_image( @typing.overload def upload_image( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -199,6 +255,8 @@ def upload_image( def upload_image( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -206,7 +264,9 @@ def upload_image( skip_deserialization: bool = False, ): return self._upload_image_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -220,6 +280,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -229,10 +291,27 @@ def post( response_for_200.ApiResponse, ]: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -242,6 +321,8 @@ def post( @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -254,6 +335,8 @@ def post( def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -261,7 +344,9 @@ def post( skip_deserialization: bool = False, ): return self._upload_image_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, 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 a654dec28bf..22b12b419ba 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 @@ -26,6 +26,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 from . import response_for_200 +from . import request_body from . import parameter_0 @@ -60,6 +61,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image_oapg( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -69,10 +72,27 @@ class BaseApi(api_client.Api): response_for_200.ApiResponse, ]: ... + @typing.overload + def _upload_image_oapg( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def _upload_image_oapg( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -82,6 +102,8 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image_oapg( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -94,6 +116,8 @@ class BaseApi(api_client.Api): def _upload_image_oapg( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -126,10 +150,21 @@ class BaseApi(api_client.Api): 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.parameter_oapg.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_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, @@ -156,6 +191,8 @@ class UploadImage(BaseApi): @typing.overload def upload_image( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -165,10 +202,27 @@ class UploadImage(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def upload_image( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def upload_image( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -178,6 +232,8 @@ class UploadImage(BaseApi): @typing.overload def upload_image( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -190,6 +246,8 @@ class UploadImage(BaseApi): def upload_image( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -197,7 +255,9 @@ class UploadImage(BaseApi): skip_deserialization: bool = False, ): return self._upload_image_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -211,6 +271,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[request_body.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, @@ -220,10 +282,27 @@ class ApiForpost(BaseApi): response_for_200.ApiResponse, ]: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[request_body.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[ + response_for_200.ApiResponse, + ]: ... + + @typing.overload def post( self, skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[request_body.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, @@ -233,6 +312,8 @@ class ApiForpost(BaseApi): @typing.overload def post( self, + content_type: str = ..., + body: typing.Union[request_body.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, @@ -245,6 +326,8 @@ class ApiForpost(BaseApi): def post( self, + content_type: str = 'multipart/form-data', + body: typing.Union[request_body.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, @@ -252,7 +335,9 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ): return self._upload_image_oapg( + body=body, path_params=path_params, + content_type=content_type, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py index 236cf812790..647a5eeffa0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py deleted file mode 100644 index 7be8f55e73a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/parameter_1.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "multipart/form-data": multipart_form_data, - }, -), 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 deleted file mode 100644 index 55c94e2ea12..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200.py +++ /dev/null @@ -1,43 +0,0 @@ -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/pet_pet_id_upload_image/post/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py index 88e145120d7..b528d5f43fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.api_response import ApiResponse - # body schemas application_json = ApiResponse diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py deleted file mode 100644 index 56ed16e1cc8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py +++ /dev/null @@ -1,265 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -_auth = [ - 'api_key', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.Int32Schema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_inventory_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Returns pet inventories by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class GetInventory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_inventory( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi deleted file mode 100644 index b2eb524a8e2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ /dev/null @@ -1,257 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.Int32Schema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_inventory_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Returns pet inventories by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response - - -class GetInventory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_inventory( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py deleted file mode 100644 index 716aea63925..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200.py +++ /dev/null @@ -1,69 +0,0 @@ -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_inventory/get/response_for_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py index 79e712f4770..2a3d6e0e55d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get/response_for_200/__init__.py @@ -15,7 +15,6 @@ from petstore_api import schemas # noqa: F401 - # body schemas diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py deleted file mode 100644 index 4dc2db0d718..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.order import Order - - -application_json = Order - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 8dcf32de5a1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200.py +++ /dev/null @@ -1,48 +0,0 @@ -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py index ae0cc9f4962..7e57df47949 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.order import Order - # body schemas application_xml = Order application_json = Order 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py index a1802dd22ce..8480550ff63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py index 7619d6890a0..37587830e22 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/parameter_0.py @@ -43,4 +43,4 @@ class MetaOapg: style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 8dcf32de5a1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200.py +++ /dev/null @@ -1,48 +0,0 @@ -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py index ae0cc9f4962..7e57df47949 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.order import Order - # body schemas application_xml = Order application_json = Order 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py deleted file mode 100644 index 8b6b93f5436..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/parameter_0.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - - -application_json = User - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post/response_for_default.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py deleted file mode 100644 index 97f5a2d3244..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/parameter_0.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post/response_for_default.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py deleted file mode 100644 index 97f5a2d3244..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/parameter_0.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - - - - -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_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post/response_for_default.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py index 4a67445accf..0281d769ad2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_0.py @@ -34,4 +34,4 @@ schema=schema, required=True, explode=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py index cc83d18a0e5..cf5876ae813 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/parameter_1.py @@ -34,4 +34,4 @@ schema=schema, 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 deleted file mode 100644 index 31da14238fe..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200.py +++ /dev/null @@ -1,72 +0,0 @@ -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: - RequiredParams = typing_extensions.TypedDict( - 'RequiredParams', - { - } - ) - OptionalParams = typing_extensions.TypedDict( - 'OptionalParams', - { - 'X-Rate-Limit': typing.Union[x_rate_limit.schema, decimal.Decimal, int, ], - 'X-Expires-After': typing.Union[x_expires_after.schema, str, datetime, ], - }, - total=False - ) - - - class Params(RequiredParams, OptionalParams): - pass - - - parameters = [ - x_rate_limit.parameter_oapg, - x_expires_after.parameter_oapg, - ] - -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py index c8389f61c89..f076f80e02b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/__init__.py @@ -14,19 +14,21 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 +from . import parameter_x_rate_limit +from . import parameter_x_expires_after class Header: RequiredParams = typing_extensions.TypedDict( 'RequiredParams', { + 'X-Rate-Limit': typing.Union[parameter_x_rate_limit.application_json, decimal.Decimal, int, ], } ) OptionalParams = typing_extensions.TypedDict( 'OptionalParams', { - 'X-Rate-Limit': typing.Union[x_rate_limit.schema, decimal.Decimal, int, ], - 'X-Expires-After': typing.Union[x_expires_after.schema, str, datetime, ], + 'X-Expires-After': typing.Union[parameter_x_expires_after.schema, str, datetime, ], }, total=False ) @@ -37,10 +39,9 @@ class Params(RequiredParams, OptionalParams): parameters = [ - x_rate_limit.parameter_oapg, - x_expires_after.parameter_oapg, + parameter_x_rate_limit.parameter_oapg, + parameter_x_expires_after.parameter_oapg, ] - # body schemas application_xml = schemas.StrSchema application_json = schemas.StrSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/parameter_x_expires_after.py similarity index 99% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/parameter_x_expires_after.py index 3801d2620b2..f8843639917 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_expires_after.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/parameter_x_expires_after.py @@ -31,4 +31,4 @@ parameter_oapg = api_client.HeaderParameterWithoutName( style=api_client.ParameterStyle.SIMPLE, schema=schema, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/parameter_x_rate_limit.py similarity index 83% rename from samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/parameter_x_rate_limit.py index bcf463d8c92..db284bcf6bc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/x_rate_limit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_200/parameter_x_rate_limit.py @@ -25,10 +25,13 @@ from petstore_api import schemas # noqa: F401 -schema = schemas.Int32Schema +application_json = schemas.Int32Schema parameter_oapg = api_client.HeaderParameterWithoutName( style=api_client.ParameterStyle.SIMPLE, - schema=schema, -), + content={ + "application/json": application_json, + }, + required=True, +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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/response_for_default.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get/response_for_default.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py index f6574145834..50a40c422fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_200.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py index f6574145834..50a40c422fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/parameter_0.py @@ -33,4 +33,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) 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 deleted file mode 100644 index dfa7a123c31..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200.py +++ /dev/null @@ -1,48 +0,0 @@ -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_200/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py index 2471814703f..48f522cb8b9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_200/__init__.py @@ -17,7 +17,6 @@ from petstore_api.model.user import User - # body schemas application_xml = User application_json = User 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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/parameter_0.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py index db095b94649..26df85d2ee2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_0.py @@ -35,4 +35,4 @@ style=api_client.ParameterStyle.SIMPLE, schema=schema, required=True, -), +) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py deleted file mode 100644 index 8b6b93f5436..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/parameter_1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - - -application_json = User - - -parameter_oapg = api_client.Parameter( - name="body", - content={ - "application/json": application_json, - }, - required=True, -), 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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_400.py +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 7ec95a8627a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put/response_for_404.py +++ /dev/null @@ -1,28 +0,0 @@ -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 9d8f03f742e..4e8b1c33fc6 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = patch.response_for_200.BodySchemas.application_json + response_body_schema = patch.response_for_200.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 870b0e17c51..07c50c0e2a8 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = patch.response_for_200.BodySchemas.application_json + response_body_schema = patch.response_for_200.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 cfa08db5ba6..be48f66d5ea 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 9985e3de124..aa816791025 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = patch.response_for_200.BodySchemas.application_json + response_body_schema = patch.response_for_200.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 99336b22e73..1865ee31607 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 ce9d45bba39..54f7388a3e3 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,10 +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.application_json - response_body_schema = post.response_for_200.BodySchemas.multipart_form_data + response_body_schema = post.response_for_200.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 101b935d203..d3feb8d42c0 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json_charsetutf_8 + response_body_schema = post.response_for_200.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 421890070ea..c20b14a5edc 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 6e5b607aaec..fb4b561c379 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 ac6f0142d0a..ec5e15b0f2c 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 ba0c6ca06f4..5f3372adbaa 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 b86f2da8886..82025e71da2 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 bb2bd3ee472..bd893ffa09b 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 78cec3a281c..d6f747a875a 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 63198567f3b..bf80535a5a3 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 79df7b7f36d..bc3c0f7c482 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 4c9ca88b9d1..c9c5cf0ee79 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 b39ea9f1ddd..dfcf189a92e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 dc312d0ce1f..4327652184f 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 ca075f4fbec..66a05db6494 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_octet_stream + response_body_schema = post.response_for_200.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 dbcfc80ffb0..16cdbb24541 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 2eb74b061bc..4320914a246 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 b45082bfdd2..03a8a8f6ffd 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,7 +32,7 @@ def tearDown(self): pass response_status = 0 - response_body_schema = get.response_for_default.BodySchemas.application_json + response_body_schema = get.response_for_default.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 693f01478d8..b65853a8f41 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,10 +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.application_xml - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 df62362e2f1..6d73f0f0e8e 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,10 +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.application_xml - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 6b7f77ef1b1..b4025901400 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,10 +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.application_xml - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 9835c581cd1..69e9fc1d8a5 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 ee0de2495a3..ac1d420df14 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,7 +33,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 be6b3bc52f8..8208e5e1984 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,10 +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.application_xml - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 47cb31c45d6..7fca47ab679 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,10 +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.application_xml - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 dcf02006251..a37041acbae 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,10 +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.application_xml - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.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 60ab583262e..1d247f5a4a3 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,10 +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.application_xml - response_body_schema = get.response_for_200.BodySchemas.application_json + response_body_schema = get.response_for_200.application_json From 30d08cec5229a502e304b93e1f9dfda50acc4dd0 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 19 Oct 2022 17:17:45 -0700 Subject: [PATCH 22/23] Samples regenerated --- .../resources/python/api_client.handlebars | 2 +- .../python/.openapi-generator/VERSION | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../test_post.py | 2 +- .../python/unit_test_api/api_client.py | 3 +- .../python/this_package/api_client.py | 213 ++++++++++++------ .../__init__.py} | 0 .../python/.openapi-generator/VERSION | 2 +- .../python/petstore_api/api_client.py | 2 +- 94 files changed, 236 insertions(+), 162 deletions(-) rename samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/{response_for_200.py => response_for_200/__init__.py} (100%) 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 547af6a8ce6..019470232aa 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 @@ -807,7 +807,7 @@ class HeaderParameter(HeaderParameterWithoutName): schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + if name in self.__disallowed_header_names: raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.name = name super().__init__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION index 717311e32e3..359a5b952d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +2.0.0 \ No newline at end of file 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 d82cd2bc5bf..4d476d6410e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_no_additional_properties_is_valid_passes(self): # no additional properties is valid 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 e66447ddfc1..500507aedf0 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_additional_properties_are_allowed_passes(self): # additional properties are allowed 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 c85a29953d4..ac493b3bad6 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_an_additional_invalid_property_is_invalid_fails(self): # an additional invalid property is invalid 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 1d1416eae79..d481d416e2b 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_properties_defined_in_allof_are_not_examined_fails(self): # properties defined in allOf are not examined 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 2390d4d856d..0c112e87586 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_allof_true_anyof_false_oneof_false_fails(self): # allOf: true, anyOf: false, oneOf: false 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 3b579d9d2fc..574d73c3ecc 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_allof_passes(self): # allOf 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 d56a695a300..e423daee17d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_valid_passes(self): # valid 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 520957259d2..3510db2f53a 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_valid_passes(self): # valid 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 963827ff11d..9ff1f262b96 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_any_data_is_valid_passes(self): # any data is valid 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 e3ec9ad5549..79520d71eb6 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_string_is_invalid_fails(self): # string is invalid 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 246653d7964..9c4c774d88e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_string_is_invalid_fails(self): # string is invalid 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 dc46c923e40..82f8301c6a9 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_any_data_is_valid_passes(self): # any data is valid 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 fc65fa4639f..d2d3d4fdd67 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_second_anyof_valid_complex_passes(self): # second anyOf valid (complex) 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 b3281057a86..664420e05b8 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_second_anyof_valid_passes(self): # second anyOf valid 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 928681c880e..d90866a6004 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_one_anyof_valid_passes(self): # one anyOf valid 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 0024d9d5a4f..15c8737394d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_string_is_valid_passes(self): # string is valid 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 7f064a6f4fe..bfc7d54a588 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_a_float_is_not_an_array_fails(self): # a float is not an array 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 4a7415a4256..bd6e7e68b3d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_an_empty_string_is_not_a_boolean_fails(self): # an empty string is not a boolean 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 728787591c4..bf66cd906e6 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_int_by_int_fail_fails(self): # int by int fail 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 d5c9c6816bf..7a39d573adc 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_45_is_multiple_of15_passes(self): # 4.5 is multiple of 1.5 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 141ad17631f..88ceb225ed1 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_000751_is_not_multiple_of00001_fails(self): # 0.00751 is not multiple of 0.0001 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 0f44295bdd6..50a51ab778d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 10b9956c894..264f5836622 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 546ce2b55b2..f98a857fea1 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_integer_zero_is_valid_passes(self): # integer zero is valid 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 f7ed9423e77..3ba349669be 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_true_is_invalid_fails(self): # true is invalid 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 2a85c737678..aa77a36692c 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_member2_is_valid_passes(self): # member 2 is valid 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 0a55b5fabf9..72f689394a4 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_false_is_valid_passes(self): # false is valid 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 05e2b1ec0d6..699ef4a104b 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_float_one_is_invalid_fails(self): # float one is invalid 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 37bece9641d..0d3afdde73e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_missing_optional_property_is_valid_passes(self): # missing optional property is valid 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 91f0f7a5004..d9c0198cbae 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_present_fails(self): # property present 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 430d6a171a4..209b36f06fa 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 d5e897f3443..b0dfa19f5e3 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_an_object_is_not_an_integer_fails(self): # an object is not an integer 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 68bc902e849..74759c9cc67 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.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 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 fff82ac6a1f..9e5496bac23 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_valid_when_property_is_specified_passes(self): # valid when property is specified 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 d887cf6a3f2..eb78697d700 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 61527310c40..c8ad2c62053 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 ee579763cb4..1aa1befb1a2 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 6332ce3df76..5d4913a5018 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_below_the_maximum_is_valid_passes(self): # below the maximum is valid 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 a376d13302e..a29ce05bebc 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_below_the_maximum_is_invalid_passes(self): # below the maximum is invalid 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 b247136e3ab..0bbc4f6f340 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_too_long_is_invalid_fails(self): # too long is invalid 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 6432226a98b..57eff56098c 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_too_long_is_invalid_fails(self): # too long is invalid 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 a1e7310dcf6..e1e3d290066 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_no_properties_is_valid_passes(self): # no properties is valid 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 0da83dac049..92a8ac62a27 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_too_long_is_invalid_fails(self): # too long is invalid 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 51f2c384876..c3a5e60315d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_boundary_point_is_valid_passes(self): # boundary point is valid 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 168a1c5453e..e6e629af30b 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_boundary_point_is_valid_passes(self): # boundary point is valid 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 1dcffdd7cb4..23550b69722 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_too_short_is_invalid_fails(self): # too short is invalid 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 528ed105b0c..5265521a1a0 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_too_short_is_invalid_fails(self): # too short is invalid 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 ef5c5db282b..c5a8604bff6 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_ignores_arrays_passes(self): # ignores arrays 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 810cd7984ff..e16576601ce 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid 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 1974ddb5102..b961b8e641b 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid 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 8fd0db7f32a..37797dfae68 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_valid_nested_array_passes(self): # valid nested array 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 35a8994ab85..1bef18603f7 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid 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 a5b82d8ed06..6253dfaaade 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_other_match_passes(self): # other match 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 1c5b946b54b..e18c15fa24f 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_allowed_passes(self): # allowed 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 774d3680059..c2f95b14522 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_match_string_with_nul_passes(self): # match string with nul 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 f49416cf51c..34cb0f7194d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_a_float_is_not_null_fails(self): # a float is not null 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 003a3f1f77b..fbeb5e0d6ea 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_an_array_is_not_a_number_fails(self): # an array is not a number 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 02ac356e196..d16d5c84950 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_ignores_arrays_passes(self): # ignores arrays 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 d0b6aecf657..82919bffc1f 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_a_float_is_not_an_object_fails(self): # a float is not an object 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 f17f61a9666..4f302bcbecb 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_first_oneof_valid_complex_passes(self): # first oneOf valid (complex) 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 41307c7f9aa..51f05632a77 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_second_oneof_valid_passes(self): # second oneOf valid 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 705c43974eb..031f4a15be6 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_both_oneof_valid_fails(self): # both oneOf valid 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 ddbec0e45c5..a6bb3083bf1 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_both_valid_invalid_fails(self): # both valid - invalid 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 43d4762f15a..1efdaac8347 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_both_valid_invalid_fails(self): # both valid - invalid 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 6c02d17b75e..9a7b069f408 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_matches_a_substring_passes(self): # matches a substring 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 c751494920a..00b63d23469 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_ignores_arrays_passes(self): # ignores arrays 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 85a89181cba..42d649e9c70 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_object_with_all_numbers_is_valid_passes(self): # object with all numbers is valid 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 3ef85297cee..8c08f8a21b5 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 1009dd2bd53..41a5a7cb5d3 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 3d846893ba2..c0ee6c1be30 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 2111d46068d..51f4dd3bf02 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 a42e9ff123b..07db8a05441 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 1cda687b68c..0fe81d57f3e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 b258dc1c5e2..e2544e93040 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 93611ac5749..5be0dabe9ba 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_named_ref_valid_passes(self): # property named $ref valid 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 f9a6f103091..5ed3b496eea 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_not_required_by_default_passes(self): # not required by default 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 02b8623d972..d911ed11e97 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_ignores_arrays_passes(self): # ignores arrays 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 1db0f9b7e3f..da4da6b039e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_property_not_required_passes(self): # property not required 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 3461faf2245..4d40c7a5e32 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_object_with_some_properties_missing_is_invalid_fails(self): # object with some properties missing is invalid 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 b8c6ad6b4bd..d2a5508554e 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_something_else_is_invalid_fails(self): # something else is invalid 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 f2745640089..b661c6c011f 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_1_is_not_a_string_fails(self): # 1 is not a string 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 984c28c06ad..9f13ebd87de 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_missing_properties_are_not_filled_in_with_the_default_passes(self): # missing properties are not filled in with the default 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 b87dd6e5089..9920c92524b 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_non_unique_array_of_integers_is_valid_passes(self): # non-unique array of integers is valid 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 9a77c3fa72d..287f9465345 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_unique_array_of_objects_is_valid_passes(self): # unique array of objects is valid 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 945d168fe9b..3c00bc9fa3f 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 a86837a48c5..27f3220cd8d 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 89c2df2e94a..71c0ae0e695 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,7 +32,7 @@ def tearDown(self): pass response_status = 200 - response_body_schema = post.response_for_200.BodySchemas.application_json + response_body_schema = post.response_for_200.application_json def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects 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 e772ef8ad95..ce8ae254b38 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 @@ -811,11 +811,10 @@ def __init__( schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + if name in self.__disallowed_header_names: raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.name = name super().__init__( - in_type=ParameterInType.HEADER, required=required, style=style, explode=explode, 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 1677291f391..60f09f6a9ce 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 @@ -325,6 +325,18 @@ def _serialize_simple( prefix_separator_iterator=prefix_separator_iterator ) + def _deserialize_simple( + self, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + class JSONDetector: """ @@ -345,7 +357,6 @@ def _content_type_is_json(cls, content_type: str) -> bool: @dataclasses.dataclass class ParameterBase(JSONDetector): - name: str in_type: ParameterInType required: bool style: typing.Optional[ParameterStyle] @@ -369,7 +380,6 @@ class ParameterBase(JSONDetector): ParameterInType.HEADER: ParameterStyle.SIMPLE, ParameterInType.COOKIE: ParameterStyle.FORM, } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() @classmethod @@ -386,7 +396,6 @@ def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_ty def __init__( self, - name: str, in_type: ParameterInType, required: bool = False, style: typing.Optional[ParameterStyle] = None, @@ -399,15 +408,12 @@ def __init__( raise ValueError('Value missing; Pass in either schema or content') if schema and content: raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.__verify_style_to_in_type(style, in_type) if content is None and style is None: style = self.__in_type_to_default_style[in_type] if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: raise ValueError('Invalid content length, content length must equal 1') self.in_type = in_type - self.name = name self.required = required self.style = style self.explode = explode @@ -426,6 +432,7 @@ def _serialize_json( class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str def __init__( self, @@ -437,8 +444,8 @@ def __init__( schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): + self.name = name super().__init__( - name, in_type=ParameterInType.PATH, required=required, style=style, @@ -523,6 +530,7 @@ def serialize( class QueryParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -537,8 +545,8 @@ def __init__( used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.QUERY, required=required, style=used_style, @@ -650,6 +658,7 @@ def serialize( class CookieParameter(ParameterBase, StyleFormSerializer): + name: str def __init__( self, @@ -664,8 +673,8 @@ def __init__( used_style = ParameterStyle.FORM if style is None and content is None and schema else style used_explode = self._get_default_explode(used_style) if explode is None else explode + self.name = name super().__init__( - name, in_type=ParameterInType.COOKIE, required=required, style=used_style, @@ -710,10 +719,10 @@ def serialize( raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) -class HeaderParameter(ParameterBase, StyleSimpleSerializer): +class HeaderParameterWithoutName(ParameterBase, StyleSimpleSerializer): + def __init__( self, - name: str, required: bool = False, style: typing.Optional[ParameterStyle] = None, explode: bool = False, @@ -722,7 +731,6 @@ def __init__( content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): super().__init__( - name, in_type=ParameterInType.HEADER, required=required, style=style, @@ -744,7 +752,8 @@ def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHead def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + name: str ) -> HTTPHeaderDict: if self.schema: cast_in_data = self.schema(in_data) @@ -755,17 +764,75 @@ def serialize( returns headers: dict """ if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) + value = self._serialize_simple(cast_in_data, name, self.explode, False) + return self.__to_headers(((name, value),)) # self.content will be length one for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) + return self.__to_headers(((name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + def deserialize( + self, + in_data: str, + name: str + ) -> Schema: + if self.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + extracted_data = self._deserialize_simple(in_data, name, self.explode, False) + return schema.from_openapi_data_oapg(extracted_data) + # self.content will be length one + for content_type, schema in self.content.items(): + if self._content_type_is_json(content_type): + cast_in_data = json.loads(in_data) + return schema.from_openapi_data_oapg(cast_in_data) + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + + +class HeaderParameter(HeaderParameterWithoutName): + name: str + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if name in self.__disallowed_header_names: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.name = name + super().__init__( + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> HTTPHeaderDict: + return super().serialize( + in_data, + self.name + ) + class Encoding: def __init__( @@ -801,13 +868,13 @@ class MediaType: class ApiResponse: response: urllib3.HTTPResponse body: typing.Union[Unset, Schema] - headers: typing.Union[Unset, typing.List[HeaderParameter]] + headers: typing.Union[Unset, typing.Dict[str, Schema]] def __init__( self, response: urllib3.HTTPResponse, - body: typing.Union[Unset, typing.Type[Schema]] = unset, - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -820,18 +887,63 @@ def __init__( @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + body: typing.Union[Unset, Schema] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset -class OpenApiResponse(JSONDetector): +class TypedDictInputVerifier: + @staticmethod + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): + """ + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes + """ + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) + + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) + + +class OpenApiResponse(JSONDetector, TypedDictInputVerifier): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') def __init__( self, response_cls: typing.Type[ApiResponse] = ApiResponse, content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, + headers: typing.Optional[typing.Dict[str, HeaderParameterWithoutName]] = None, ): self.headers = headers if content is not None and len(content) == 0: @@ -921,8 +1033,14 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati deserialized_headers = unset if self.headers is not None: - # TODO add header deserialiation here - pass + self._verify_typed_dict_inputs_oapg(self.response_cls.headers, response.headers) + deserialized_headers = {} + for header_name, header_param in self.headers.items(): + header_value = response.getheader(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value if self.content is not None: if content_type not in self.content: @@ -1258,7 +1376,7 @@ def update_params_for_auth(self, headers, auth_settings, ) -class Api: +class Api(TypedDictInputVerifier): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -1270,49 +1388,6 @@ def __init__(self, api_client: typing.Optional[ApiClient] = None): api_client = ApiClient() self.api_client = api_client - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - def _get_host_oapg( self, operation_id: str, 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/__init__.py similarity index 100% rename from samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/response_for_200.py rename to samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators/post/response_for_200/__init__.py 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 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 fc580cfeb6b..9f8817d7b1e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -811,7 +811,7 @@ def __init__( schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + if name in self.__disallowed_header_names: raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.name = name super().__init__( From efde0dbf7727e530f9dd3423776673704cb17879 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 19 Oct 2022 21:23:18 -0700 Subject: [PATCH 23/23] Fixes java tests --- .../java/org/openapitools/codegen/DefaultCodegenTest.java | 6 ++++-- .../openapitools/codegen/java/AbstractJavaCodegenTest.java | 5 +++-- .../java/org/openapitools/codegen/java/JavaModelTest.java | 3 ++- 3 files changed, 9 insertions(+), 5 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 e731f054f34..15b801cff44 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 @@ -2032,7 +2032,8 @@ public void objectQueryParamIdentifyAsObject() { codegen.setOpenAPI(openAPI); Set imports = new HashSet<>(); - CodegenParameter parameter = codegen.fromParameter(openAPI.getPaths().get("/pony").getGet().getParameters().get(0), imports); + CodegenParameter parameter = codegen.fromParameter( + openAPI.getPaths().get("/pony").getGet().getParameters().get(0), imports, "0"); // TODO: This must be updated to work with flattened inline models Assert.assertEquals(parameter.dataType, "ListPageQueryParameter"); @@ -2217,7 +2218,8 @@ private CodegenParameter codegenParameter(String path) { .getGet() .getParameters() .get(0), - new HashSet<>() + new HashSet<>(), + "0" ); } diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java index 2edaa5024e7..cff7a430ac4 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java @@ -650,7 +650,7 @@ public void dateDefaultValueIsIsoDate() { codegen.setOpenAPI(openAPI); Set imports = new HashSet<>(); - CodegenParameter parameter = codegen.fromParameter(openAPI.getPaths().get("/thingy/{date}").getGet().getParameters().get(2), imports); + CodegenParameter parameter = codegen.fromParameter(openAPI.getPaths().get("/thingy/{date}").getGet().getParameters().get(2), imports, "2"); Assert.assertEquals(parameter.dataType, "Date"); Assert.assertEquals(parameter.isDate, true); @@ -669,7 +669,8 @@ public void dateDefaultValueIsIsoDateTime() { codegen.setOpenAPI(openAPI); Set imports = new HashSet<>(); - CodegenParameter parameter = codegen.fromParameter(openAPI.getPaths().get("/thingy/{date}").getGet().getParameters().get(1), imports); + CodegenParameter parameter = codegen.fromParameter( + openAPI.getPaths().get("/thingy/{date}").getGet().getParameters().get(1), imports, "1"); Assert.assertEquals(parameter.dataType, "Date"); Assert.assertEquals(parameter.isDateTime, true); diff --git a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java index 50d0679986f..6a5b6cff49b 100644 --- a/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java +++ b/modules/openapi-json-schema-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java @@ -37,6 +37,7 @@ import java.io.File; import java.nio.file.Files; +import java.util.HashSet; import java.util.List; public class JavaModelTest { @@ -773,7 +774,7 @@ public void convertParameterTest() { .required(true); final DefaultCodegen codegen = new JavaClientCodegen(); codegen.setOpenAPI(openAPI); - final CodegenParameter cm = codegen.fromParameter(parameter, null); + final CodegenParameter cm = codegen.fromParameter(parameter, new HashSet<>(), "0"); Assert.assertNull(cm.allowableValues); Assert.assertEquals(cm.description, "this is a description");