mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 08:46:55 +00:00
fix exception in request body with enum ref (#17438)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -309,7 +309,6 @@ class HeaderApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -294,7 +294,6 @@ class PathApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -309,7 +309,6 @@ class HeaderApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -294,7 +294,6 @@ class PathApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -254,7 +254,6 @@ class AnotherFakeApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -233,7 +233,6 @@ class DefaultApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -254,7 +254,6 @@ class FakeClassnameTags123Api:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -254,7 +254,6 @@ class AnotherFakeApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -233,7 +233,6 @@ class DefaultApi:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -254,7 +254,6 @@ class FakeClassnameTags123Api:
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
@@ -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] = {}
|
||||
|
||||
Reference in New Issue
Block a user