From a62132ecd9465e5f3dee43e08d8d8327624c67bd Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 21 Dec 2023 15:22:28 +0800 Subject: [PATCH] fix exception in request body with enum ref (#17438) --- .../languages/AbstractPythonCodegen.java | 2 +- .../src/main/resources/python/api.mustache | 7 +- ...ith-fake-endpoints-models-for-testing.yaml | 13 + .../openapi_client/api/auth_api.py | 2 - .../openapi_client/api/body_api.py | 8 - .../openapi_client/api/form_api.py | 2 - .../openapi_client/api/header_api.py | 1 - .../openapi_client/api/path_api.py | 1 - .../openapi_client/api/query_api.py | 8 - .../python/openapi_client/api/auth_api.py | 2 - .../python/openapi_client/api/body_api.py | 8 - .../python/openapi_client/api/form_api.py | 2 - .../python/openapi_client/api/header_api.py | 1 - .../python/openapi_client/api/path_api.py | 1 - .../python/openapi_client/api/query_api.py | 8 - .../client/petstore/python-aiohttp/README.md | 1 + .../petstore/python-aiohttp/docs/FakeApi.md | 65 +++++ .../petstore_api/api/another_fake_api.py | 1 - .../petstore_api/api/default_api.py | 1 - .../petstore_api/api/fake_api.py | 263 ++++++++++++++++-- .../api/fake_classname_tags123_api.py | 1 - .../petstore_api/api/pet_api.py | 9 - .../petstore_api/api/store_api.py | 4 - .../petstore_api/api/user_api.py | 8 - .../python-pydantic-v1-aiohttp/README.md | 1 + .../docs/FakeApi.md | 62 +++++ .../petstore_api/api/fake_api.py | 114 ++++++++ .../petstore/python-pydantic-v1/README.md | 1 + .../python-pydantic-v1/docs/FakeApi.md | 62 +++++ .../petstore_api/api/fake_api.py | 130 +++++++++ .../openapi3/client/petstore/python/README.md | 1 + .../client/petstore/python/docs/FakeApi.md | 65 +++++ .../petstore_api/api/another_fake_api.py | 1 - .../python/petstore_api/api/default_api.py | 1 - .../python/petstore_api/api/fake_api.py | 263 ++++++++++++++++-- .../api/fake_classname_tags123_api.py | 1 - .../python/petstore_api/api/pet_api.py | 9 - .../python/petstore_api/api/store_api.py | 4 - .../python/petstore_api/api/user_api.py | 8 - 39 files changed, 999 insertions(+), 143 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java index 5c31c4ae2f..e847d37af7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java @@ -2200,7 +2200,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co // TODO process the first one only at the moment if (cmt != null) // TODO: don't loop back to the deprecated getPydanticType method - result = getPydanticType(cmt.getSchema(), typingImports, pydanticImports, datetimeImports, modelImports, exampleImports, postponedModelImports, postponedExampleImports, classname); + return getPydanticType(cmt.getSchema(), typingImports, pydanticImports, datetimeImports, modelImports, exampleImports, postponedModelImports, postponedExampleImports, classname); } throw new RuntimeException("Error! Failed to process getPydanticType when getting the content: " + cp); } else { diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 4d6717ec55..fdfbfbb872 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -97,8 +97,11 @@ class {{classname}}: {{/servers.0}} _collection_formats: Dict[str, str] = { - {{#allParams}}{{#isArray}} - '{{baseName}}': '{{collectionFormat}}',{{/isArray}}{{/allParams}} + {{#allParams}} + {{#isArray}} + '{{baseName}}': '{{collectionFormat}}', + {{/isArray}} + {{/allParams}} } _path_params: Dict[str, str] = {} diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml index 3b6219f79e..eba5879a5e 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1365,6 +1365,19 @@ paths: type: array items: $ref: "#/components/schemas/ListOfObjects" + /fake/ref_enum_string: + get: + tags: + - fake + summary: test ref to enum string + operationId: fake_ref_enum_string + responses: + 200: + description: OK + content: + plain/text: + schema: + $ref: "#/components/schemas/EnumClass" servers: - url: 'http://{server}.swagger.io:{port}/v2' description: petstore server diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py index 278e2f912f..82740c98af 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py @@ -239,7 +239,6 @@ class AuthApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -483,7 +482,6 @@ class AuthApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py index ce402ce625..bba3d47300 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py @@ -247,7 +247,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -503,7 +502,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -779,7 +777,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - 'files': 'csv', } @@ -1051,7 +1048,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1322,7 +1318,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1593,7 +1588,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1864,7 +1858,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2135,7 +2128,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py index 21d287cc78..d3cc6a2f35 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py @@ -282,7 +282,6 @@ class FormApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -622,7 +621,6 @@ class FormApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py index 95a123d998..0303dd3710 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py @@ -309,7 +309,6 @@ class HeaderApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py index 9ff10b52d3..f7e4a3e200 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py @@ -294,7 +294,6 @@ class PathApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py index dd0603a1fa..8b37ac7bbe 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py @@ -274,7 +274,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -564,7 +563,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -876,7 +874,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1144,7 +1141,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1404,7 +1400,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1664,7 +1659,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1924,7 +1918,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2184,7 +2177,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python/openapi_client/api/auth_api.py b/samples/client/echo_api/python/openapi_client/api/auth_api.py index 278e2f912f..82740c98af 100644 --- a/samples/client/echo_api/python/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python/openapi_client/api/auth_api.py @@ -239,7 +239,6 @@ class AuthApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -483,7 +482,6 @@ class AuthApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python/openapi_client/api/body_api.py b/samples/client/echo_api/python/openapi_client/api/body_api.py index ce402ce625..bba3d47300 100644 --- a/samples/client/echo_api/python/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python/openapi_client/api/body_api.py @@ -247,7 +247,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -503,7 +502,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -779,7 +777,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - 'files': 'csv', } @@ -1051,7 +1048,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1322,7 +1318,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1593,7 +1588,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1864,7 +1858,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2135,7 +2128,6 @@ class BodyApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python/openapi_client/api/form_api.py b/samples/client/echo_api/python/openapi_client/api/form_api.py index 21d287cc78..d3cc6a2f35 100644 --- a/samples/client/echo_api/python/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python/openapi_client/api/form_api.py @@ -282,7 +282,6 @@ class FormApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -622,7 +621,6 @@ class FormApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python/openapi_client/api/header_api.py b/samples/client/echo_api/python/openapi_client/api/header_api.py index 95a123d998..0303dd3710 100644 --- a/samples/client/echo_api/python/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python/openapi_client/api/header_api.py @@ -309,7 +309,6 @@ class HeaderApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python/openapi_client/api/path_api.py b/samples/client/echo_api/python/openapi_client/api/path_api.py index 9ff10b52d3..f7e4a3e200 100644 --- a/samples/client/echo_api/python/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python/openapi_client/api/path_api.py @@ -294,7 +294,6 @@ class PathApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/client/echo_api/python/openapi_client/api/query_api.py b/samples/client/echo_api/python/openapi_client/api/query_api.py index dd0603a1fa..8b37ac7bbe 100644 --- a/samples/client/echo_api/python/openapi_client/api/query_api.py +++ b/samples/client/echo_api/python/openapi_client/api/query_api.py @@ -274,7 +274,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -564,7 +563,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -876,7 +874,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1144,7 +1141,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1404,7 +1400,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1664,7 +1659,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1924,7 +1918,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2184,7 +2177,6 @@ class QueryApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-aiohttp/README.md b/samples/openapi3/client/petstore/python-aiohttp/README.md index 6784ec797e..3506f64f00 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/README.md +++ b/samples/openapi3/client/petstore/python-aiohttp/README.md @@ -96,6 +96,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | *FakeApi* | [**fake_property_enum_integer_serialize**](docs/FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**fake_ref_enum_string**](docs/FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string *FakeApi* | [**fake_return_list_of_objects**](docs/FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects *FakeApi* | [**fake_uuid_example**](docs/FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example *FakeApi* | [**test_body_with_binary**](docs/FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md index 7a04ffa585..8fc15e4dba 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | [**fake_property_enum_integer_serialize**](FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +[**fake_ref_enum_string**](FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string [**fake_return_list_of_objects**](FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects [**fake_uuid_example**](FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example [**test_body_with_binary**](FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | @@ -704,6 +705,70 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **fake_ref_enum_string** +> EnumClass fake_ref_enum_string() + +test ref to enum string + +### Example + + +```python +import time +import os +import petstore_api +from petstore_api.models.enum_class import EnumClass +from petstore_api.rest import ApiException +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 +async with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test ref to enum string + api_response = await api_instance.fake_ref_enum_string() + print("The response of FakeApi->fake_ref_enum_string:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FakeApi->fake_ref_enum_string: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**EnumClass**](EnumClass.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: plain/text + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **fake_return_list_of_objects** > List[List[Tag]] fake_return_list_of_objects() diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py index 249d397b9d..1ee8d84e83 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py @@ -254,7 +254,6 @@ class AnotherFakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py index 401f2118d9..3693f1c58e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py @@ -233,7 +233,6 @@ class DefaultApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index 22172e4627..f996f41256 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -266,7 +266,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -528,7 +527,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -766,7 +764,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1045,7 +1042,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1318,7 +1314,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1589,7 +1584,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1860,7 +1854,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2131,7 +2124,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2402,7 +2394,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2464,6 +2455,245 @@ class FakeApi: + @validate_call + async def fake_ref_enum_string( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EnumClass: + """test ref to enum string + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fake_ref_enum_string_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnumClass", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def fake_ref_enum_string_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EnumClass]: + """test ref to enum string + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fake_ref_enum_string_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnumClass", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def fake_ref_enum_string_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """test ref to enum string + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fake_ref_enum_string_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnumClass", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _fake_ref_enum_string_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'plain/text' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/fake/ref_enum_string', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call async def fake_return_list_of_objects( self, @@ -2657,7 +2887,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2910,7 +3139,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3164,7 +3392,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3434,7 +3661,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3709,7 +3935,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3978,7 +4203,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -4259,7 +4483,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -4516,7 +4739,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -4957,7 +5179,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -5241,7 +5462,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -5562,7 +5782,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -5833,7 +6052,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -6098,7 +6316,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -6376,7 +6593,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -6721,7 +6937,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - 'pipe': 'pipes', 'ioutil': 'csv', 'http': 'ssv', diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py index eb627e7def..a7c2ebcc40 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py @@ -254,7 +254,6 @@ class FakeClassnameTags123Api: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py index e6130a864c..d9d939b6ba 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py @@ -262,7 +262,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -546,7 +545,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -804,7 +802,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - 'status': 'csv', } @@ -1074,7 +1071,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - 'tags': 'csv', } @@ -1344,7 +1340,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1613,7 +1608,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1910,7 +1904,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2206,7 +2199,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2508,7 +2500,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py index a06aa360e4..90066b44b2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py @@ -261,7 +261,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -500,7 +499,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -763,7 +761,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1025,7 +1022,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py index 679a1a9a9b..beaf3bbaca 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py @@ -260,7 +260,6 @@ class UserApi: _host = _hosts[_host_index] _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -522,7 +521,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - 'User': '', } @@ -785,7 +783,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - 'User': '', } @@ -1054,7 +1051,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1312,7 +1308,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1587,7 +1582,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1836,7 +1830,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2102,7 +2095,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md index bb23b64132..260e453470 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md @@ -96,6 +96,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | *FakeApi* | [**fake_property_enum_integer_serialize**](docs/FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**fake_ref_enum_string**](docs/FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string *FakeApi* | [**fake_return_list_of_objects**](docs/FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects *FakeApi* | [**fake_uuid_example**](docs/FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example *FakeApi* | [**test_body_with_binary**](docs/FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md index ffff4acfb3..cd55f60c70 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | [**fake_property_enum_integer_serialize**](FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +[**fake_ref_enum_string**](FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string [**fake_return_list_of_objects**](FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects [**fake_uuid_example**](FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example [**test_body_with_binary**](FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | @@ -677,6 +678,67 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **fake_ref_enum_string** +> EnumClass fake_ref_enum_string() + +test ref to enum string + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.models.enum_class import EnumClass +from petstore_api.rest import ApiException +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 +async with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test ref to enum string + api_response = await api_instance.fake_ref_enum_string() + print("The response of FakeApi->fake_ref_enum_string:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FakeApi->fake_ref_enum_string: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EnumClass**](EnumClass.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: plain/text + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **fake_return_list_of_objects** > List[List[Tag]] fake_return_list_of_objects() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py index 526cd7113b..61aa92e781 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py @@ -1204,6 +1204,120 @@ class FakeApi: collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + async def fake_ref_enum_string(self, **kwargs) -> EnumClass: # noqa: E501 + """test ref to enum string # noqa: E501 + + + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: EnumClass + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the fake_ref_enum_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return await self.fake_ref_enum_string_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + async def fake_ref_enum_string_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """test ref to enum string # noqa: E501 + + + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(EnumClass, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method fake_ref_enum_string" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['plain/text']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "EnumClass", + } + + return await self.api_client.call_api( + '/fake/ref_enum_string', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments async def fake_return_list_of_objects(self, **kwargs) -> List[List[Tag]]: # noqa: E501 """test returning list of objects # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/README.md b/samples/openapi3/client/petstore/python-pydantic-v1/README.md index 71954df374..10ed9cb068 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/README.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/README.md @@ -96,6 +96,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | *FakeApi* | [**fake_property_enum_integer_serialize**](docs/FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**fake_ref_enum_string**](docs/FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string *FakeApi* | [**fake_return_list_of_objects**](docs/FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects *FakeApi* | [**fake_uuid_example**](docs/FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example *FakeApi* | [**test_body_with_binary**](docs/FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md index dc894179ff..a55370f56c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | [**fake_property_enum_integer_serialize**](FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +[**fake_ref_enum_string**](FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string [**fake_return_list_of_objects**](FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects [**fake_uuid_example**](FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example [**test_body_with_binary**](FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | @@ -677,6 +678,67 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **fake_ref_enum_string** +> EnumClass fake_ref_enum_string() + +test ref to enum string + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.models.enum_class import EnumClass +from petstore_api.rest import ApiException +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 = petstore_api.FakeApi(api_client) + + try: + # test ref to enum string + api_response = api_instance.fake_ref_enum_string() + print("The response of FakeApi->fake_ref_enum_string:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FakeApi->fake_ref_enum_string: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EnumClass**](EnumClass.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: plain/text + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **fake_return_list_of_objects** > List[List[Tag]] fake_return_list_of_objects() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py index 35f06ac5b9..291418ce5d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py @@ -1347,6 +1347,136 @@ class FakeApi: collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def fake_ref_enum_string(self, **kwargs) -> EnumClass: # noqa: E501 + """test ref to enum string # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fake_ref_enum_string(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: EnumClass + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the fake_ref_enum_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.fake_ref_enum_string_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def fake_ref_enum_string_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """test ref to enum string # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fake_ref_enum_string_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(EnumClass, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method fake_ref_enum_string" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['plain/text']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "EnumClass", + } + + return self.api_client.call_api( + '/fake/ref_enum_string', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def fake_return_list_of_objects(self, **kwargs) -> List[List[Tag]]: # noqa: E501 """test returning list of objects # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index 5555cd3d60..2b705d722f 100755 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -96,6 +96,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | *FakeApi* | [**fake_property_enum_integer_serialize**](docs/FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**fake_ref_enum_string**](docs/FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string *FakeApi* | [**fake_return_list_of_objects**](docs/FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects *FakeApi* | [**fake_uuid_example**](docs/FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example *FakeApi* | [**test_body_with_binary**](docs/FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index 6ed23e2df6..056e39cbbc 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | [**fake_property_enum_integer_serialize**](FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | +[**fake_ref_enum_string**](FakeApi.md#fake_ref_enum_string) | **GET** /fake/ref_enum_string | test ref to enum string [**fake_return_list_of_objects**](FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects [**fake_uuid_example**](FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example [**test_body_with_binary**](FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | @@ -704,6 +705,70 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **fake_ref_enum_string** +> EnumClass fake_ref_enum_string() + +test ref to enum string + +### Example + + +```python +import time +import os +import petstore_api +from petstore_api.models.enum_class import EnumClass +from petstore_api.rest import ApiException +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 = petstore_api.FakeApi(api_client) + + try: + # test ref to enum string + api_response = api_instance.fake_ref_enum_string() + print("The response of FakeApi->fake_ref_enum_string:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FakeApi->fake_ref_enum_string: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**EnumClass**](EnumClass.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: plain/text + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **fake_return_list_of_objects** > List[List[Tag]] fake_return_list_of_objects() diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 2ea2e1862c..6e02e2089e 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -254,7 +254,6 @@ class AnotherFakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py index 2c54019d9e..3f662edd5c 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py @@ -233,7 +233,6 @@ class DefaultApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 687cd8287d..20e85ac2ac 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -266,7 +266,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -528,7 +527,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -766,7 +764,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1045,7 +1042,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1318,7 +1314,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1589,7 +1584,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1860,7 +1854,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2131,7 +2124,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2402,7 +2394,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2464,6 +2455,245 @@ class FakeApi: + @validate_call + def fake_ref_enum_string( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EnumClass: + """test ref to enum string + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fake_ref_enum_string_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnumClass", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fake_ref_enum_string_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EnumClass]: + """test ref to enum string + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fake_ref_enum_string_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnumClass", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def fake_ref_enum_string_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """test ref to enum string + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fake_ref_enum_string_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnumClass", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _fake_ref_enum_string_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'plain/text' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/fake/ref_enum_string', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def fake_return_list_of_objects( self, @@ -2657,7 +2887,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2910,7 +3139,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3164,7 +3392,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3434,7 +3661,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3709,7 +3935,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -3978,7 +4203,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -4259,7 +4483,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -4516,7 +4739,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -4957,7 +5179,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -5241,7 +5462,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -5562,7 +5782,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -5833,7 +6052,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -6098,7 +6316,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -6376,7 +6593,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -6721,7 +6937,6 @@ class FakeApi: _host = None _collection_formats: Dict[str, str] = { - 'pipe': 'pipes', 'ioutil': 'csv', 'http': 'ssv', diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py index 9ce463db91..04cc040e6f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py @@ -254,7 +254,6 @@ class FakeClassnameTags123Api: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index caa3fb84b0..fba079f8bc 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -262,7 +262,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -546,7 +545,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -804,7 +802,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - 'status': 'csv', } @@ -1074,7 +1071,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - 'tags': 'csv', } @@ -1344,7 +1340,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1613,7 +1608,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1910,7 +1904,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2206,7 +2199,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2508,7 +2500,6 @@ class PetApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index fd77a92f11..81b53840a2 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -261,7 +261,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -500,7 +499,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -763,7 +761,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1025,7 +1022,6 @@ class StoreApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index 2811f29911..2331c7fb56 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -260,7 +260,6 @@ class UserApi: _host = _hosts[_host_index] _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -522,7 +521,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - 'User': '', } @@ -785,7 +783,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - 'User': '', } @@ -1054,7 +1051,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1312,7 +1308,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1587,7 +1582,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -1836,7 +1830,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} @@ -2102,7 +2095,6 @@ class UserApi: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {}