forked from loafle/openapi-generator-original
python: several typing and style improvements (#16378)
* python: several typing and style improvements The generated (python) code fails with several standard validation tools, including `flake8`, `mypy`, and `autoflake`. While fixing every possible violation -- especially wrto typing -- woudl be a project, some of the changes are fairly easy. - The `autoflake` tool picks up on unused imports. These can just be removed. - The `mypy` tool picks up on numerious typing violations, especially if set to its strictest mode. As a starting point, all functions ought to annotate a return type, including constructors, even if the return type is `None` because otherwise the functions are omitted from type checking and it's impossible to make incremental progress towards adding types. - The `flake8` tool mostly finds whitespace and line-length issues; while line-length standards very, the source already includes several flake8 ignores, so it seems safe to add a few more. * Add generated files * Restore imports used by `AbstractPythonCodegen.java` * Update generated files
This commit is contained in:
parent
c0abeceb85
commit
40731ed52d
@ -23,14 +23,14 @@ from {{packageName}}.exceptions import ( # noqa: F401
|
||||
|
||||
|
||||
{{#operations}}
|
||||
class {{classname}}(object):
|
||||
class {{classname}}:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -65,8 +65,8 @@ class {{classname}}(object):
|
||||
{{/allParams}}
|
||||
: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
|
||||
: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.
|
||||
@ -76,7 +76,8 @@ class {{classname}}(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the {{operationId}}_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the {{operationId}}_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
{{#asyncio}}
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
|
@ -24,7 +24,7 @@ from {{packageName}} import rest
|
||||
from {{packageName}}.exceptions import ApiValueError, ApiException
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
class ApiClient:
|
||||
"""Generic API client for OpenAPI client library builds.
|
||||
|
||||
OpenAPI generic API client. This client handles the client-
|
||||
@ -56,7 +56,7 @@ class ApiClient(object):
|
||||
_pool = None
|
||||
|
||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
||||
cookie=None, pool_threads=1):
|
||||
cookie=None, pool_threads=1) -> None:
|
||||
# use default configuration if none is provided
|
||||
if configuration is None:
|
||||
configuration = Configuration.get_default()
|
||||
@ -348,7 +348,7 @@ class ApiClient(object):
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
if type(klass) == str:
|
||||
if isinstance(klass, str):
|
||||
if klass.startswith('List['):
|
||||
sub_kls = re.match(r'List\[(.*)]', klass).group(1)
|
||||
return [self.__deserialize(sub_data, sub_kls)
|
||||
|
@ -18,7 +18,7 @@ class ApiResponse:
|
||||
status_code=None,
|
||||
headers=None,
|
||||
data=None,
|
||||
raw_data=None):
|
||||
raw_data=None) -> None:
|
||||
self.status_code = status_code
|
||||
self.headers = headers
|
||||
self.data = data
|
||||
|
@ -4,22 +4,20 @@
|
||||
|
||||
import unittest
|
||||
|
||||
import {{packageName}}
|
||||
from {{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501
|
||||
from {{packageName}}.rest import ApiException
|
||||
|
||||
|
||||
class {{#operations}}Test{{classname}}(unittest.TestCase):
|
||||
"""{{classname}} unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
self.api = {{apiPackage}}.{{classFilename}}.{{classname}}() # noqa: E501
|
||||
def setUp(self) -> None:
|
||||
self.api = {{classname}}() # noqa: E501
|
||||
|
||||
def tearDown(self):
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
{{#operation}}
|
||||
def test_{{operationId}}(self):
|
||||
def test_{{operationId}}(self) -> None:
|
||||
"""Test case for {{{operationId}}}
|
||||
|
||||
{{#summary}}
|
||||
|
@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class RESTResponse(io.IOBase):
|
||||
|
||||
def __init__(self, resp, data):
|
||||
def __init__(self, resp, data) -> None:
|
||||
self.aiohttp_response = resp
|
||||
self.status = resp.status
|
||||
self.reason = resp.reason
|
||||
@ -33,9 +33,9 @@ class RESTResponse(io.IOBase):
|
||||
return self.aiohttp_response.headers.get(name, default)
|
||||
|
||||
|
||||
class RESTClientObject(object):
|
||||
class RESTClientObject:
|
||||
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None):
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
|
||||
|
||||
# maxsize is number of requests to host that are allowed in parallel
|
||||
if maxsize is None:
|
||||
|
@ -11,7 +11,6 @@ import sys
|
||||
import urllib3
|
||||
|
||||
import http.client as httplib
|
||||
from {{packageName}}.exceptions import ApiValueError
|
||||
|
||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
||||
@ -19,7 +18,7 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
||||
}
|
||||
|
||||
class Configuration(object):
|
||||
class Configuration:
|
||||
"""This class contains various settings of the API client.
|
||||
|
||||
:param host: Base url.
|
||||
@ -45,7 +44,8 @@ class Configuration(object):
|
||||
configuration.
|
||||
:param server_operation_variables: Mapping from operation ID to a mapping with
|
||||
string values to replace variables in templated server configuration.
|
||||
The validation of enums is performed for variables with defined enum values before.
|
||||
The validation of enums is performed for variables with defined enum
|
||||
values before.
|
||||
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
||||
in PEM format.
|
||||
|
||||
@ -146,7 +146,7 @@ conf = {{{packageName}}}.Configuration(
|
||||
server_index=None, server_variables=None,
|
||||
server_operation_index=None, server_operation_variables=None,
|
||||
ssl_ca_cert=None,
|
||||
):
|
||||
) -> None:
|
||||
"""Constructor
|
||||
"""
|
||||
self._base_path = "{{{basePath}}}" if host is None else host
|
||||
|
@ -8,7 +8,7 @@ class OpenApiException(Exception):
|
||||
|
||||
class ApiTypeError(OpenApiException, TypeError):
|
||||
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
||||
key_type=None):
|
||||
key_type=None) -> None:
|
||||
""" Raises an exception for TypeErrors
|
||||
|
||||
Args:
|
||||
@ -36,7 +36,7 @@ class ApiTypeError(OpenApiException, TypeError):
|
||||
|
||||
|
||||
class ApiValueError(OpenApiException, ValueError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -54,7 +54,7 @@ class ApiValueError(OpenApiException, ValueError):
|
||||
|
||||
|
||||
class ApiAttributeError(OpenApiException, AttributeError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Raised when an attribute reference or assignment fails.
|
||||
|
||||
@ -73,7 +73,7 @@ class ApiAttributeError(OpenApiException, AttributeError):
|
||||
|
||||
|
||||
class ApiKeyError(OpenApiException, KeyError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -91,7 +91,7 @@ class ApiKeyError(OpenApiException, KeyError):
|
||||
|
||||
class ApiException(OpenApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
if http_resp:
|
||||
self.status = http_resp.status
|
||||
self.reason = http_resp.reason
|
||||
@ -118,30 +118,30 @@ class ApiException(OpenApiException):
|
||||
|
||||
class BadRequestException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(BadRequestException, self).__init__(status, reason, http_resp)
|
||||
|
||||
class NotFoundException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(NotFoundException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class UnauthorizedException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ForbiddenException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ServiceException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ServiceException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
|
||||
}
|
||||
{{/discriminator}}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -39,7 +39,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
|
||||
}
|
||||
{{/discriminator}}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -7,9 +7,7 @@ import datetime
|
||||
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
import {{packageName}}
|
||||
from {{modelPackage}}.{{classFilename}} import {{classname}} # noqa: E501
|
||||
from {{packageName}}.rest import ApiException
|
||||
|
||||
class Test{{classname}}(unittest.TestCase):
|
||||
"""{{classname}} unit test stubs"""
|
||||
@ -21,21 +19,21 @@ class Test{{classname}}(unittest.TestCase):
|
||||
pass
|
||||
{{^isEnum}}
|
||||
|
||||
def make_instance(self, include_optional):
|
||||
def make_instance(self, include_optional) -> {{classname}}:
|
||||
"""Test {{classname}}
|
||||
include_option is a boolean, when False only required
|
||||
params are included, when True both required and
|
||||
optional params are included """
|
||||
# uncomment below to create an instance of `{{{classname}}}`
|
||||
"""
|
||||
model = {{packageName}}.models.{{classFilename}}.{{classname}}() # noqa: E501
|
||||
if include_optional :
|
||||
model = {{classname}}() # noqa: E501
|
||||
if include_optional:
|
||||
return {{classname}}(
|
||||
{{#vars}}
|
||||
{{name}} = {{{example}}}{{^example}}None{{/example}}{{^-last}}, {{/-last}}
|
||||
{{name}} = {{{example}}}{{^example}}None{{/example}}{{^-last}},{{/-last}}
|
||||
{{/vars}}
|
||||
)
|
||||
else :
|
||||
else:
|
||||
return {{classname}}(
|
||||
{{#vars}}
|
||||
{{#required}}
|
||||
|
@ -19,7 +19,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class RESTResponse(io.IOBase):
|
||||
|
||||
def __init__(self, resp):
|
||||
def __init__(self, resp) -> None:
|
||||
self.urllib3_response = resp
|
||||
self.status = resp.status
|
||||
self.reason = resp.reason
|
||||
@ -34,9 +34,9 @@ class RESTResponse(io.IOBase):
|
||||
return self.urllib3_response.headers.get(name, default)
|
||||
|
||||
|
||||
class RESTClientObject(object):
|
||||
class RESTClientObject:
|
||||
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None):
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
|
||||
# urllib3.PoolManager will pass all kw parameters to connectionpool
|
||||
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
|
||||
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
|
||||
|
@ -56,7 +56,7 @@ HASH_SHA256 = 'sha256'
|
||||
HASH_SHA512 = 'sha512'
|
||||
|
||||
|
||||
class HttpSigningConfiguration(object):
|
||||
class HttpSigningConfiguration:
|
||||
"""The configuration parameters for the HTTP signature security scheme.
|
||||
The HTTP signature security scheme is used to sign HTTP requests with a private key
|
||||
which is in possession of the API client.
|
||||
@ -112,7 +112,7 @@ class HttpSigningConfiguration(object):
|
||||
signed_headers=None,
|
||||
signing_algorithm=None,
|
||||
hash_algorithm=None,
|
||||
signature_max_validity=None):
|
||||
signature_max_validity=None) -> None:
|
||||
self.key_id = key_id
|
||||
if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}:
|
||||
raise Exception("Unsupported security scheme: {0}".format(signing_scheme))
|
||||
|
@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class RESTResponse(io.IOBase):
|
||||
|
||||
def __init__(self, resp):
|
||||
def __init__(self, resp) -> None:
|
||||
self.tornado_response = resp
|
||||
self.status = resp.code
|
||||
self.reason = resp.reason
|
||||
@ -39,9 +39,9 @@ class RESTResponse(io.IOBase):
|
||||
return self.tornado_response.headers.get(name, default)
|
||||
|
||||
|
||||
class RESTClientObject(object):
|
||||
class RESTClientObject:
|
||||
|
||||
def __init__(self, configuration, pools_size=4, maxsize=4):
|
||||
def __init__(self, configuration, pools_size=4, maxsize=4) -> None:
|
||||
# maxsize is number of requests to host that are allowed in parallel
|
||||
|
||||
self.ca_certs = configuration.ssl_ca_cert
|
||||
|
@ -35,14 +35,14 @@ from openapi_client.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class BodyApi(object):
|
||||
class BodyApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -60,8 +60,8 @@ class BodyApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -71,7 +71,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_binary_gif_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_binary_gif_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_binary_gif_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -193,8 +194,8 @@ class BodyApi(object):
|
||||
:type body: bytearray
|
||||
: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
|
||||
: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.
|
||||
@ -204,7 +205,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_application_octetstream_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_application_octetstream_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_application_octetstream_binary_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -344,8 +346,8 @@ class BodyApi(object):
|
||||
:type files: List[bytearray]
|
||||
: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
|
||||
: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.
|
||||
@ -355,7 +357,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_multipart_formdata_array_of_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_multipart_formdata_array_of_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_multipart_formdata_array_of_binary_with_http_info(files, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -491,8 +494,8 @@ class BodyApi(object):
|
||||
:type body: object
|
||||
: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
|
||||
: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.
|
||||
@ -502,7 +505,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_echo_body_free_form_object_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_echo_body_free_form_object_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_free_form_object_response_string_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -637,8 +641,8 @@ class BodyApi(object):
|
||||
:type pet: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -648,7 +652,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_echo_body_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_echo_body_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_pet_with_http_info(pet, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -783,8 +788,8 @@ class BodyApi(object):
|
||||
:type pet: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -794,7 +799,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_echo_body_pet_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_echo_body_pet_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_pet_response_string_with_http_info(pet, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -929,8 +935,8 @@ class BodyApi(object):
|
||||
:type tag: Tag
|
||||
: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
|
||||
: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.
|
||||
@ -940,7 +946,8 @@ class BodyApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_echo_body_tag_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_echo_body_tag_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_tag_response_string_with_http_info(tag, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -33,14 +33,14 @@ from openapi_client.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class FormApi(object):
|
||||
class FormApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -64,8 +64,8 @@ class FormApi(object):
|
||||
:type string_form: str
|
||||
: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
|
||||
: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.
|
||||
@ -75,7 +75,8 @@ class FormApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_form_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_form_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_form_integer_boolean_string_with_http_info(integer_form, boolean_form, string_form, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -33,14 +33,14 @@ from openapi_client.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class HeaderApi(object):
|
||||
class HeaderApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -64,8 +64,8 @@ class HeaderApi(object):
|
||||
:type string_header: str
|
||||
: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
|
||||
: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.
|
||||
@ -75,7 +75,8 @@ class HeaderApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_header_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_header_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_header_integer_boolean_string_with_http_info(integer_header, boolean_header, string_header, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -31,14 +31,14 @@ from openapi_client.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class PathApi(object):
|
||||
class PathApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -60,8 +60,8 @@ class PathApi(object):
|
||||
:type path_integer: int
|
||||
: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
|
||||
: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.
|
||||
@ -71,7 +71,8 @@ class PathApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the tests_path_string_path_string_integer_path_integer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the tests_path_string_path_string_integer_path_integer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.tests_path_string_path_string_integer_path_integer_with_http_info(path_string, path_integer, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -38,14 +38,14 @@ from openapi_client.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class QueryApi(object):
|
||||
class QueryApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -65,8 +65,8 @@ class QueryApi(object):
|
||||
:type enum_ref_string_query: StringEnumRef
|
||||
: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
|
||||
: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.
|
||||
@ -76,7 +76,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_enum_ref_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_enum_ref_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_enum_ref_string_with_http_info(enum_ref_string_query, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -208,8 +209,8 @@ class QueryApi(object):
|
||||
:type string_query: str
|
||||
: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
|
||||
: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.
|
||||
@ -219,7 +220,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_datetime_date_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_datetime_date_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_datetime_date_string_with_http_info(datetime_query, date_query, string_query, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -369,8 +371,8 @@ class QueryApi(object):
|
||||
:type string_query: str
|
||||
: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
|
||||
: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.
|
||||
@ -380,7 +382,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_integer_boolean_string_with_http_info(integer_query, boolean_query, string_query, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -520,8 +523,8 @@ class QueryApi(object):
|
||||
:type query_object: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -531,7 +534,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_style_deep_object_explode_true_object_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_style_deep_object_explode_true_object_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_deep_object_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -659,8 +663,8 @@ class QueryApi(object):
|
||||
:type query_object: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
: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
|
||||
: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.
|
||||
@ -670,7 +674,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_style_deep_object_explode_true_object_all_of_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_style_deep_object_explode_true_object_all_of_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_deep_object_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -798,8 +803,8 @@ class QueryApi(object):
|
||||
:type query_object: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
|
||||
: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
|
||||
: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.
|
||||
@ -809,7 +814,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_style_form_explode_true_array_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_style_form_explode_true_array_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_form_explode_true_array_string_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -937,8 +943,8 @@ class QueryApi(object):
|
||||
:type query_object: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -948,7 +954,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_style_form_explode_true_object_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_style_form_explode_true_object_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_form_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1076,8 +1083,8 @@ class QueryApi(object):
|
||||
:type query_object: DataQuery
|
||||
: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
|
||||
: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.
|
||||
@ -1087,7 +1094,8 @@ class QueryApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_style_form_explode_true_object_all_of_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_style_form_explode_true_object_all_of_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_form_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -32,7 +32,7 @@ from openapi_client import rest
|
||||
from openapi_client.exceptions import ApiValueError, ApiException
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
class ApiClient:
|
||||
"""Generic API client for OpenAPI client library builds.
|
||||
|
||||
OpenAPI generic API client. This client handles the client-
|
||||
@ -64,7 +64,7 @@ class ApiClient(object):
|
||||
_pool = None
|
||||
|
||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
||||
cookie=None, pool_threads=1):
|
||||
cookie=None, pool_threads=1) -> None:
|
||||
# use default configuration if none is provided
|
||||
if configuration is None:
|
||||
configuration = Configuration.get_default()
|
||||
@ -330,7 +330,7 @@ class ApiClient(object):
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
if type(klass) == str:
|
||||
if isinstance(klass, str):
|
||||
if klass.startswith('List['):
|
||||
sub_kls = re.match(r'List\[(.*)]', klass).group(1)
|
||||
return [self.__deserialize(sub_data, sub_kls)
|
||||
|
@ -18,7 +18,7 @@ class ApiResponse:
|
||||
status_code=None,
|
||||
headers=None,
|
||||
data=None,
|
||||
raw_data=None):
|
||||
raw_data=None) -> None:
|
||||
self.status_code = status_code
|
||||
self.headers = headers
|
||||
self.data = data
|
||||
|
@ -20,7 +20,6 @@ import sys
|
||||
import urllib3
|
||||
|
||||
import http.client as httplib
|
||||
from openapi_client.exceptions import ApiValueError
|
||||
|
||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
||||
@ -28,7 +27,7 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
||||
}
|
||||
|
||||
class Configuration(object):
|
||||
class Configuration:
|
||||
"""This class contains various settings of the API client.
|
||||
|
||||
:param host: Base url.
|
||||
@ -50,7 +49,8 @@ class Configuration(object):
|
||||
configuration.
|
||||
:param server_operation_variables: Mapping from operation ID to a mapping with
|
||||
string values to replace variables in templated server configuration.
|
||||
The validation of enums is performed for variables with defined enum values before.
|
||||
The validation of enums is performed for variables with defined enum
|
||||
values before.
|
||||
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
||||
in PEM format.
|
||||
|
||||
@ -65,7 +65,7 @@ class Configuration(object):
|
||||
server_index=None, server_variables=None,
|
||||
server_operation_index=None, server_operation_variables=None,
|
||||
ssl_ca_cert=None,
|
||||
):
|
||||
) -> None:
|
||||
"""Constructor
|
||||
"""
|
||||
self._base_path = "http://localhost:3000" if host is None else host
|
||||
|
@ -19,7 +19,7 @@ class OpenApiException(Exception):
|
||||
|
||||
class ApiTypeError(OpenApiException, TypeError):
|
||||
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
||||
key_type=None):
|
||||
key_type=None) -> None:
|
||||
""" Raises an exception for TypeErrors
|
||||
|
||||
Args:
|
||||
@ -47,7 +47,7 @@ class ApiTypeError(OpenApiException, TypeError):
|
||||
|
||||
|
||||
class ApiValueError(OpenApiException, ValueError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -65,7 +65,7 @@ class ApiValueError(OpenApiException, ValueError):
|
||||
|
||||
|
||||
class ApiAttributeError(OpenApiException, AttributeError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Raised when an attribute reference or assignment fails.
|
||||
|
||||
@ -84,7 +84,7 @@ class ApiAttributeError(OpenApiException, AttributeError):
|
||||
|
||||
|
||||
class ApiKeyError(OpenApiException, KeyError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -102,7 +102,7 @@ class ApiKeyError(OpenApiException, KeyError):
|
||||
|
||||
class ApiException(OpenApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
if http_resp:
|
||||
self.status = http_resp.status
|
||||
self.reason = http_resp.reason
|
||||
@ -129,30 +129,30 @@ class ApiException(OpenApiException):
|
||||
|
||||
class BadRequestException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(BadRequestException, self).__init__(status, reason, http_resp)
|
||||
|
||||
class NotFoundException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(NotFoundException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class UnauthorizedException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ForbiddenException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ServiceException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ServiceException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class RESTResponse(io.IOBase):
|
||||
|
||||
def __init__(self, resp):
|
||||
def __init__(self, resp) -> None:
|
||||
self.urllib3_response = resp
|
||||
self.status = resp.status
|
||||
self.reason = resp.reason
|
||||
@ -45,9 +45,9 @@ class RESTResponse(io.IOBase):
|
||||
return self.urllib3_response.headers.get(name, default)
|
||||
|
||||
|
||||
class RESTClientObject(object):
|
||||
class RESTClientObject:
|
||||
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None):
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
|
||||
# urllib3.PoolManager will pass all kw parameters to connectionpool
|
||||
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
|
||||
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
|
||||
|
@ -32,14 +32,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class AnotherFakeApi(object):
|
||||
class AnotherFakeApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -67,8 +67,8 @@ class AnotherFakeApi(object):
|
||||
:type client: Client
|
||||
: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
|
||||
: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.
|
||||
@ -78,7 +78,8 @@ class AnotherFakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the call_123_test_special_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the call_123_test_special_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
|
||||
|
@ -30,14 +30,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class DefaultApi(object):
|
||||
class DefaultApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -62,8 +62,8 @@ class DefaultApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -73,7 +73,8 @@ class DefaultApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the foo_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the foo_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.foo_get_with_http_info(**kwargs) # noqa: E501
|
||||
|
@ -44,14 +44,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class FakeApi(object):
|
||||
class FakeApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -78,8 +78,8 @@ class FakeApi(object):
|
||||
:type body: object
|
||||
: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
|
||||
: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.
|
||||
@ -89,7 +89,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_any_type_request_body_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_any_type_request_body_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_any_type_request_body_with_http_info(body, **kwargs) # noqa: E501
|
||||
@ -226,8 +227,8 @@ class FakeApi(object):
|
||||
:type enum_ref: EnumClass
|
||||
: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
|
||||
: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.
|
||||
@ -237,7 +238,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_enum_ref_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_enum_ref_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501
|
||||
@ -365,8 +367,8 @@ class FakeApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -376,7 +378,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_health_get_with_http_info(**kwargs) # noqa: E501
|
||||
@ -510,8 +513,8 @@ class FakeApi(object):
|
||||
:type header_1: str
|
||||
: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
|
||||
: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.
|
||||
@ -521,7 +524,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_http_signature_test_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_http_signature_test_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_http_signature_test_with_http_info(pet, query_1, header_1, **kwargs) # noqa: E501
|
||||
@ -671,8 +675,8 @@ class FakeApi(object):
|
||||
:type body: bool
|
||||
: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
|
||||
: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.
|
||||
@ -682,7 +686,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_boolean_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_boolean_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_outer_boolean_serialize_with_http_info(body, **kwargs) # noqa: E501
|
||||
@ -827,8 +832,8 @@ class FakeApi(object):
|
||||
:type outer_composite: OuterComposite
|
||||
: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
|
||||
: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.
|
||||
@ -838,7 +843,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_composite_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_composite_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_outer_composite_serialize_with_http_info(outer_composite, **kwargs) # noqa: E501
|
||||
@ -983,8 +989,8 @@ class FakeApi(object):
|
||||
:type body: float
|
||||
: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
|
||||
: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.
|
||||
@ -994,7 +1000,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_number_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_number_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_outer_number_serialize_with_http_info(body, **kwargs) # noqa: E501
|
||||
@ -1139,8 +1146,8 @@ class FakeApi(object):
|
||||
:type body: str
|
||||
: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
|
||||
: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.
|
||||
@ -1150,7 +1157,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_string_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_string_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_outer_string_serialize_with_http_info(body, **kwargs) # noqa: E501
|
||||
@ -1295,8 +1303,8 @@ class FakeApi(object):
|
||||
:type outer_object_with_enum_property: OuterObjectWithEnumProperty
|
||||
: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
|
||||
: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.
|
||||
@ -1306,7 +1314,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501
|
||||
@ -1448,8 +1457,8 @@ class FakeApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -1459,7 +1468,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_return_list_of_objects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_return_list_of_objects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.fake_return_list_of_objects_with_http_info(**kwargs) # noqa: E501
|
||||
@ -1731,8 +1741,8 @@ class FakeApi(object):
|
||||
:type body: bytearray
|
||||
: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
|
||||
: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.
|
||||
@ -1742,7 +1752,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_with_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_with_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_body_with_binary_with_http_info(body, **kwargs) # noqa: E501
|
||||
@ -1886,8 +1897,8 @@ class FakeApi(object):
|
||||
:type file_schema_test_class: FileSchemaTestClass
|
||||
: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
|
||||
: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.
|
||||
@ -1897,7 +1908,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_with_file_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_with_file_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
|
||||
@ -2037,8 +2049,8 @@ class FakeApi(object):
|
||||
:type user: User
|
||||
: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
|
||||
: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.
|
||||
@ -2048,7 +2060,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_with_query_params_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_with_query_params_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
|
||||
@ -2192,8 +2205,8 @@ class FakeApi(object):
|
||||
:type client: Client
|
||||
: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
|
||||
: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.
|
||||
@ -2203,7 +2216,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_client_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_client_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
|
||||
@ -2349,8 +2363,8 @@ class FakeApi(object):
|
||||
:type str_query: str
|
||||
: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
|
||||
: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.
|
||||
@ -2360,7 +2374,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_date_time_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_date_time_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_date_time_query_parameter_with_http_info(date_time_query, str_query, **kwargs) # noqa: E501
|
||||
@ -2528,8 +2543,8 @@ class FakeApi(object):
|
||||
:type param_callback: str
|
||||
: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
|
||||
: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.
|
||||
@ -2539,7 +2554,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501
|
||||
@ -2772,8 +2788,8 @@ class FakeApi(object):
|
||||
:type int64_group: int
|
||||
: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
|
||||
: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.
|
||||
@ -2783,7 +2799,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_group_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_group_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, **kwargs) # noqa: E501
|
||||
@ -2945,8 +2962,8 @@ class FakeApi(object):
|
||||
:type request_body: Dict[str, str]
|
||||
: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
|
||||
: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.
|
||||
@ -2956,7 +2973,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_inline_additional_properties_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_inline_additional_properties_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
|
||||
@ -3097,8 +3115,8 @@ class FakeApi(object):
|
||||
:type param2: str
|
||||
: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
|
||||
: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.
|
||||
@ -3108,7 +3126,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_json_form_data_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_json_form_data_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
|
||||
@ -3265,8 +3284,8 @@ class FakeApi(object):
|
||||
:type language: Dict[str, str]
|
||||
: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
|
||||
: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.
|
||||
@ -3276,7 +3295,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_parameter_collection_format_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_parameter_collection_format_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, **kwargs) # noqa: E501
|
||||
|
@ -32,14 +32,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class FakeClassnameTags123Api(object):
|
||||
class FakeClassnameTags123Api:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -67,8 +67,8 @@ class FakeClassnameTags123Api(object):
|
||||
:type client: Client
|
||||
: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
|
||||
: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.
|
||||
@ -78,7 +78,8 @@ class FakeClassnameTags123Api(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_classname_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_classname_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
|
||||
|
@ -35,14 +35,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class PetApi(object):
|
||||
class PetApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -70,8 +70,8 @@ class PetApi(object):
|
||||
:type pet: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -81,7 +81,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the add_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the add_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
|
||||
@ -222,8 +223,8 @@ class PetApi(object):
|
||||
:type api_key: str
|
||||
: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
|
||||
: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.
|
||||
@ -233,7 +234,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the delete_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the delete_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.delete_pet_with_http_info(pet_id, api_key, **kwargs) # noqa: E501
|
||||
@ -371,8 +373,8 @@ class PetApi(object):
|
||||
:type status: List[str]
|
||||
: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
|
||||
: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.
|
||||
@ -382,7 +384,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the find_pets_by_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the find_pets_by_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
|
||||
@ -522,8 +525,8 @@ class PetApi(object):
|
||||
:type tags: List[str]
|
||||
: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
|
||||
: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.
|
||||
@ -533,7 +536,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the find_pets_by_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the find_pets_by_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
|
||||
@ -675,8 +679,8 @@ class PetApi(object):
|
||||
:type pet_id: int
|
||||
: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
|
||||
: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.
|
||||
@ -686,7 +690,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_pet_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_pet_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
|
||||
@ -826,8 +831,8 @@ class PetApi(object):
|
||||
:type pet: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -837,7 +842,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the update_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the update_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
|
||||
@ -980,8 +986,8 @@ class PetApi(object):
|
||||
:type status: str
|
||||
: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
|
||||
: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.
|
||||
@ -991,7 +997,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the update_pet_with_form_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the update_pet_with_form_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.update_pet_with_form_with_http_info(pet_id, name, status, **kwargs) # noqa: E501
|
||||
@ -1146,8 +1153,8 @@ class PetApi(object):
|
||||
:type file: bytearray
|
||||
: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
|
||||
: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.
|
||||
@ -1157,7 +1164,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the upload_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the upload_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.upload_file_with_http_info(pet_id, additional_metadata, file, **kwargs) # noqa: E501
|
||||
@ -1318,8 +1326,8 @@ class PetApi(object):
|
||||
:type additional_metadata: str
|
||||
: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
|
||||
: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.
|
||||
@ -1329,7 +1337,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the upload_file_with_required_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the upload_file_with_required_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, **kwargs) # noqa: E501
|
||||
|
@ -34,14 +34,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class StoreApi(object):
|
||||
class StoreApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -69,8 +69,8 @@ class StoreApi(object):
|
||||
:type order_id: str
|
||||
: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
|
||||
: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.
|
||||
@ -80,7 +80,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the delete_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the delete_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
|
||||
@ -210,8 +211,8 @@ class StoreApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -221,7 +222,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_inventory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_inventory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
|
||||
@ -353,8 +355,8 @@ class StoreApi(object):
|
||||
:type order_id: int
|
||||
: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
|
||||
: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.
|
||||
@ -364,7 +366,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_order_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_order_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
|
||||
@ -504,8 +507,8 @@ class StoreApi(object):
|
||||
:type order: Order
|
||||
: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
|
||||
: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.
|
||||
@ -515,7 +518,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the place_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the place_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.place_order_with_http_info(order, **kwargs) # noqa: E501
|
||||
|
@ -32,14 +32,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class UserApi(object):
|
||||
class UserApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -67,8 +67,8 @@ class UserApi(object):
|
||||
:type user: User
|
||||
: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
|
||||
: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.
|
||||
@ -78,7 +78,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.create_user_with_http_info(user, **kwargs) # noqa: E501
|
||||
@ -232,8 +233,8 @@ class UserApi(object):
|
||||
:type user: List[User]
|
||||
: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
|
||||
: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.
|
||||
@ -243,7 +244,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the create_users_with_array_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the create_users_with_array_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
|
||||
@ -382,8 +384,8 @@ class UserApi(object):
|
||||
:type user: List[User]
|
||||
: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
|
||||
: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.
|
||||
@ -393,7 +395,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the create_users_with_list_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the create_users_with_list_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
|
||||
@ -532,8 +535,8 @@ class UserApi(object):
|
||||
:type username: str
|
||||
: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
|
||||
: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.
|
||||
@ -543,7 +546,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.delete_user_with_http_info(username, **kwargs) # noqa: E501
|
||||
@ -675,8 +679,8 @@ class UserApi(object):
|
||||
:type username: str
|
||||
: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
|
||||
: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.
|
||||
@ -686,7 +690,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_user_by_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_user_by_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
|
||||
@ -828,8 +833,8 @@ class UserApi(object):
|
||||
:type password: str
|
||||
: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
|
||||
: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.
|
||||
@ -839,7 +844,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the login_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the login_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
|
||||
@ -982,8 +988,8 @@ class UserApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -993,7 +999,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the logout_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the logout_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.logout_user_with_http_info(**kwargs) # noqa: E501
|
||||
@ -1121,8 +1128,8 @@ class UserApi(object):
|
||||
:type user: User
|
||||
: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
|
||||
: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.
|
||||
@ -1132,7 +1139,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the update_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the update_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
if async_req is not None:
|
||||
kwargs['async_req'] = async_req
|
||||
return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
|
||||
|
@ -31,7 +31,7 @@ from petstore_api import rest
|
||||
from petstore_api.exceptions import ApiValueError, ApiException
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
class ApiClient:
|
||||
"""Generic API client for OpenAPI client library builds.
|
||||
|
||||
OpenAPI generic API client. This client handles the client-
|
||||
@ -63,7 +63,7 @@ class ApiClient(object):
|
||||
_pool = None
|
||||
|
||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
||||
cookie=None, pool_threads=1):
|
||||
cookie=None, pool_threads=1) -> None:
|
||||
# use default configuration if none is provided
|
||||
if configuration is None:
|
||||
configuration = Configuration.get_default()
|
||||
@ -330,7 +330,7 @@ class ApiClient(object):
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
if type(klass) == str:
|
||||
if isinstance(klass, str):
|
||||
if klass.startswith('List['):
|
||||
sub_kls = re.match(r'List\[(.*)]', klass).group(1)
|
||||
return [self.__deserialize(sub_data, sub_kls)
|
||||
|
@ -18,7 +18,7 @@ class ApiResponse:
|
||||
status_code=None,
|
||||
headers=None,
|
||||
data=None,
|
||||
raw_data=None):
|
||||
raw_data=None) -> None:
|
||||
self.status_code = status_code
|
||||
self.headers = headers
|
||||
self.data = data
|
||||
|
@ -18,7 +18,6 @@ import sys
|
||||
import urllib3
|
||||
|
||||
import http.client as httplib
|
||||
from petstore_api.exceptions import ApiValueError
|
||||
|
||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
||||
@ -26,7 +25,7 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
||||
}
|
||||
|
||||
class Configuration(object):
|
||||
class Configuration:
|
||||
"""This class contains various settings of the API client.
|
||||
|
||||
:param host: Base url.
|
||||
@ -50,7 +49,8 @@ class Configuration(object):
|
||||
configuration.
|
||||
:param server_operation_variables: Mapping from operation ID to a mapping with
|
||||
string values to replace variables in templated server configuration.
|
||||
The validation of enums is performed for variables with defined enum values before.
|
||||
The validation of enums is performed for variables with defined enum
|
||||
values before.
|
||||
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
||||
in PEM format.
|
||||
|
||||
@ -141,7 +141,7 @@ conf = petstore_api.Configuration(
|
||||
server_index=None, server_variables=None,
|
||||
server_operation_index=None, server_operation_variables=None,
|
||||
ssl_ca_cert=None,
|
||||
):
|
||||
) -> None:
|
||||
"""Constructor
|
||||
"""
|
||||
self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host
|
||||
|
@ -18,7 +18,7 @@ class OpenApiException(Exception):
|
||||
|
||||
class ApiTypeError(OpenApiException, TypeError):
|
||||
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
||||
key_type=None):
|
||||
key_type=None) -> None:
|
||||
""" Raises an exception for TypeErrors
|
||||
|
||||
Args:
|
||||
@ -46,7 +46,7 @@ class ApiTypeError(OpenApiException, TypeError):
|
||||
|
||||
|
||||
class ApiValueError(OpenApiException, ValueError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -64,7 +64,7 @@ class ApiValueError(OpenApiException, ValueError):
|
||||
|
||||
|
||||
class ApiAttributeError(OpenApiException, AttributeError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Raised when an attribute reference or assignment fails.
|
||||
|
||||
@ -83,7 +83,7 @@ class ApiAttributeError(OpenApiException, AttributeError):
|
||||
|
||||
|
||||
class ApiKeyError(OpenApiException, KeyError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -101,7 +101,7 @@ class ApiKeyError(OpenApiException, KeyError):
|
||||
|
||||
class ApiException(OpenApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
if http_resp:
|
||||
self.status = http_resp.status
|
||||
self.reason = http_resp.reason
|
||||
@ -128,30 +128,30 @@ class ApiException(OpenApiException):
|
||||
|
||||
class BadRequestException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(BadRequestException, self).__init__(status, reason, http_resp)
|
||||
|
||||
class NotFoundException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(NotFoundException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class UnauthorizedException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ForbiddenException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ServiceException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ServiceException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ class AnyOfColor(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -45,7 +45,7 @@ class AnyOfPig(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -44,7 +44,7 @@ class Color(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -42,7 +42,7 @@ class IntOrString(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -44,7 +44,7 @@ class OneOfEnumString(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -47,7 +47,7 @@ class Pig(BaseModel):
|
||||
discriminator_value_class_map = {
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class RESTResponse(io.IOBase):
|
||||
|
||||
def __init__(self, resp, data):
|
||||
def __init__(self, resp, data) -> None:
|
||||
self.aiohttp_response = resp
|
||||
self.status = resp.status
|
||||
self.reason = resp.reason
|
||||
@ -43,9 +43,9 @@ class RESTResponse(io.IOBase):
|
||||
return self.aiohttp_response.headers.get(name, default)
|
||||
|
||||
|
||||
class RESTClientObject(object):
|
||||
class RESTClientObject:
|
||||
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None):
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
|
||||
|
||||
# maxsize is number of requests to host that are allowed in parallel
|
||||
if maxsize is None:
|
||||
|
@ -66,7 +66,7 @@ HASH_SHA256 = 'sha256'
|
||||
HASH_SHA512 = 'sha512'
|
||||
|
||||
|
||||
class HttpSigningConfiguration(object):
|
||||
class HttpSigningConfiguration:
|
||||
"""The configuration parameters for the HTTP signature security scheme.
|
||||
The HTTP signature security scheme is used to sign HTTP requests with a private key
|
||||
which is in possession of the API client.
|
||||
@ -122,7 +122,7 @@ class HttpSigningConfiguration(object):
|
||||
signed_headers=None,
|
||||
signing_algorithm=None,
|
||||
hash_algorithm=None,
|
||||
signature_max_validity=None):
|
||||
signature_max_validity=None) -> None:
|
||||
self.key_id = key_id
|
||||
if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}:
|
||||
raise Exception("Unsupported security scheme: {0}".format(signing_scheme))
|
||||
|
@ -31,14 +31,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class AnotherFakeApi(object):
|
||||
class AnotherFakeApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -58,8 +58,8 @@ class AnotherFakeApi(object):
|
||||
:type client: Client
|
||||
: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
|
||||
: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.
|
||||
@ -69,7 +69,8 @@ class AnotherFakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the call_123_test_special_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the call_123_test_special_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -29,14 +29,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class DefaultApi(object):
|
||||
class DefaultApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -53,8 +53,8 @@ class DefaultApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -64,7 +64,8 @@ class DefaultApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the foo_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the foo_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.foo_get_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -43,14 +43,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class FakeApi(object):
|
||||
class FakeApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -69,8 +69,8 @@ class FakeApi(object):
|
||||
:type body: object
|
||||
: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
|
||||
: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.
|
||||
@ -80,7 +80,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_any_type_request_body_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_any_type_request_body_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_any_type_request_body_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -207,8 +208,8 @@ class FakeApi(object):
|
||||
:type enum_ref: EnumClass
|
||||
: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
|
||||
: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.
|
||||
@ -218,7 +219,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_enum_ref_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_enum_ref_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -336,8 +338,8 @@ class FakeApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -347,7 +349,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_health_get_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -471,8 +474,8 @@ class FakeApi(object):
|
||||
:type header_1: str
|
||||
: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
|
||||
: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.
|
||||
@ -482,7 +485,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_http_signature_test_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_http_signature_test_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_http_signature_test_with_http_info(pet, query_1, header_1, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -622,8 +626,8 @@ class FakeApi(object):
|
||||
:type body: bool
|
||||
: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
|
||||
: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.
|
||||
@ -633,7 +637,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_boolean_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_boolean_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_outer_boolean_serialize_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -768,8 +773,8 @@ class FakeApi(object):
|
||||
:type outer_composite: OuterComposite
|
||||
: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
|
||||
: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.
|
||||
@ -779,7 +784,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_composite_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_composite_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_outer_composite_serialize_with_http_info(outer_composite, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -914,8 +920,8 @@ class FakeApi(object):
|
||||
:type body: float
|
||||
: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
|
||||
: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.
|
||||
@ -925,7 +931,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_number_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_number_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_outer_number_serialize_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1060,8 +1067,8 @@ class FakeApi(object):
|
||||
:type body: str
|
||||
: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
|
||||
: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.
|
||||
@ -1071,7 +1078,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_outer_string_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_outer_string_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_outer_string_serialize_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1206,8 +1214,8 @@ class FakeApi(object):
|
||||
:type outer_object_with_enum_property: OuterObjectWithEnumProperty
|
||||
: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
|
||||
: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.
|
||||
@ -1217,7 +1225,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1349,8 +1358,8 @@ class FakeApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -1360,7 +1369,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the fake_return_list_of_objects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the fake_return_list_of_objects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.fake_return_list_of_objects_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1612,8 +1622,8 @@ class FakeApi(object):
|
||||
:type body: bytearray
|
||||
: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
|
||||
: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.
|
||||
@ -1623,7 +1633,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_with_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_with_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_with_binary_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1757,8 +1768,8 @@ class FakeApi(object):
|
||||
:type file_schema_test_class: FileSchemaTestClass
|
||||
: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
|
||||
: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.
|
||||
@ -1768,7 +1779,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_with_file_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_with_file_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1898,8 +1910,8 @@ class FakeApi(object):
|
||||
:type user: User
|
||||
: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
|
||||
: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.
|
||||
@ -1909,7 +1921,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_body_with_query_params_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_body_with_query_params_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -2043,8 +2056,8 @@ class FakeApi(object):
|
||||
:type client: Client
|
||||
: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
|
||||
: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.
|
||||
@ -2054,7 +2067,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_client_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_client_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -2190,8 +2204,8 @@ class FakeApi(object):
|
||||
:type str_query: str
|
||||
: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
|
||||
: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.
|
||||
@ -2201,7 +2215,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_date_time_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_date_time_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_date_time_query_parameter_with_http_info(date_time_query, str_query, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -2359,8 +2374,8 @@ class FakeApi(object):
|
||||
:type param_callback: str
|
||||
: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
|
||||
: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.
|
||||
@ -2370,7 +2385,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -2593,8 +2609,8 @@ class FakeApi(object):
|
||||
:type int64_group: int
|
||||
: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
|
||||
: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.
|
||||
@ -2604,7 +2620,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_group_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_group_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -2756,8 +2773,8 @@ class FakeApi(object):
|
||||
:type request_body: Dict[str, str]
|
||||
: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
|
||||
: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.
|
||||
@ -2767,7 +2784,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_inline_additional_properties_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_inline_additional_properties_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -2898,8 +2916,8 @@ class FakeApi(object):
|
||||
:type param2: str
|
||||
: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
|
||||
: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.
|
||||
@ -2909,7 +2927,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_json_form_data_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_json_form_data_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -3056,8 +3075,8 @@ class FakeApi(object):
|
||||
:type language: Dict[str, str]
|
||||
: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
|
||||
: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.
|
||||
@ -3067,7 +3086,8 @@ class FakeApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_query_parameter_collection_format_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_query_parameter_collection_format_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -31,14 +31,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class FakeClassnameTags123Api(object):
|
||||
class FakeClassnameTags123Api:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -58,8 +58,8 @@ class FakeClassnameTags123Api(object):
|
||||
:type client: Client
|
||||
: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
|
||||
: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.
|
||||
@ -69,7 +69,8 @@ class FakeClassnameTags123Api(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the test_classname_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the test_classname_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -34,14 +34,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class PetApi(object):
|
||||
class PetApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -61,8 +61,8 @@ class PetApi(object):
|
||||
:type pet: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -72,7 +72,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the add_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the add_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -203,8 +204,8 @@ class PetApi(object):
|
||||
:type api_key: str
|
||||
: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
|
||||
: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.
|
||||
@ -214,7 +215,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the delete_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the delete_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.delete_pet_with_http_info(pet_id, api_key, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -342,8 +344,8 @@ class PetApi(object):
|
||||
:type status: List[str]
|
||||
: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
|
||||
: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.
|
||||
@ -353,7 +355,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the find_pets_by_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the find_pets_by_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -483,8 +486,8 @@ class PetApi(object):
|
||||
:type tags: List[str]
|
||||
: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
|
||||
: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.
|
||||
@ -494,7 +497,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the find_pets_by_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the find_pets_by_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -626,8 +630,8 @@ class PetApi(object):
|
||||
:type pet_id: int
|
||||
: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
|
||||
: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.
|
||||
@ -637,7 +641,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_pet_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_pet_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -767,8 +772,8 @@ class PetApi(object):
|
||||
:type pet: Pet
|
||||
: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
|
||||
: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.
|
||||
@ -778,7 +783,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the update_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the update_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -911,8 +917,8 @@ class PetApi(object):
|
||||
:type status: str
|
||||
: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
|
||||
: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.
|
||||
@ -922,7 +928,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the update_pet_with_form_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the update_pet_with_form_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.update_pet_with_form_with_http_info(pet_id, name, status, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1067,8 +1074,8 @@ class PetApi(object):
|
||||
:type file: bytearray
|
||||
: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
|
||||
: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.
|
||||
@ -1078,7 +1085,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the upload_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the upload_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.upload_file_with_http_info(pet_id, additional_metadata, file, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1229,8 +1237,8 @@ class PetApi(object):
|
||||
:type additional_metadata: str
|
||||
: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
|
||||
: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.
|
||||
@ -1240,7 +1248,8 @@ class PetApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the upload_file_with_required_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the upload_file_with_required_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -33,14 +33,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class StoreApi(object):
|
||||
class StoreApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -60,8 +60,8 @@ class StoreApi(object):
|
||||
:type order_id: str
|
||||
: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
|
||||
: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.
|
||||
@ -71,7 +71,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the delete_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the delete_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -191,8 +192,8 @@ class StoreApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -202,7 +203,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_inventory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_inventory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -324,8 +326,8 @@ class StoreApi(object):
|
||||
:type order_id: int
|
||||
: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
|
||||
: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.
|
||||
@ -335,7 +337,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_order_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_order_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -465,8 +468,8 @@ class StoreApi(object):
|
||||
:type order: Order
|
||||
: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
|
||||
: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.
|
||||
@ -476,7 +479,8 @@ class StoreApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the place_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the place_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.place_order_with_http_info(order, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -31,14 +31,14 @@ from petstore_api.exceptions import ( # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class UserApi(object):
|
||||
class UserApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
@ -58,8 +58,8 @@ class UserApi(object):
|
||||
:type user: User
|
||||
: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
|
||||
: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.
|
||||
@ -69,7 +69,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.create_user_with_http_info(user, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -213,8 +214,8 @@ class UserApi(object):
|
||||
:type user: List[User]
|
||||
: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
|
||||
: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.
|
||||
@ -224,7 +225,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the create_users_with_array_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the create_users_with_array_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -353,8 +355,8 @@ class UserApi(object):
|
||||
:type user: List[User]
|
||||
: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
|
||||
: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.
|
||||
@ -364,7 +366,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the create_users_with_list_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the create_users_with_list_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -493,8 +496,8 @@ class UserApi(object):
|
||||
:type username: str
|
||||
: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
|
||||
: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.
|
||||
@ -504,7 +507,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.delete_user_with_http_info(username, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -626,8 +630,8 @@ class UserApi(object):
|
||||
:type username: str
|
||||
: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
|
||||
: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.
|
||||
@ -637,7 +641,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the get_user_by_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the get_user_by_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -769,8 +774,8 @@ class UserApi(object):
|
||||
:type password: str
|
||||
: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
|
||||
: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.
|
||||
@ -780,7 +785,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the login_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the login_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -913,8 +919,8 @@ class UserApi(object):
|
||||
|
||||
: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
|
||||
: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.
|
||||
@ -924,7 +930,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the logout_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the logout_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.logout_user_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
@ -1042,8 +1049,8 @@ class UserApi(object):
|
||||
:type user: User
|
||||
: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
|
||||
: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.
|
||||
@ -1053,7 +1060,8 @@ class UserApi(object):
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
raise ValueError("Error! Please call the update_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
|
||||
message = "Error! Please call the update_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
|
@ -31,7 +31,7 @@ from petstore_api import rest
|
||||
from petstore_api.exceptions import ApiValueError, ApiException
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
class ApiClient:
|
||||
"""Generic API client for OpenAPI client library builds.
|
||||
|
||||
OpenAPI generic API client. This client handles the client-
|
||||
@ -63,7 +63,7 @@ class ApiClient(object):
|
||||
_pool = None
|
||||
|
||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
||||
cookie=None, pool_threads=1):
|
||||
cookie=None, pool_threads=1) -> None:
|
||||
# use default configuration if none is provided
|
||||
if configuration is None:
|
||||
configuration = Configuration.get_default()
|
||||
@ -329,7 +329,7 @@ class ApiClient(object):
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
if type(klass) == str:
|
||||
if isinstance(klass, str):
|
||||
if klass.startswith('List['):
|
||||
sub_kls = re.match(r'List\[(.*)]', klass).group(1)
|
||||
return [self.__deserialize(sub_data, sub_kls)
|
||||
|
@ -18,7 +18,7 @@ class ApiResponse:
|
||||
status_code=None,
|
||||
headers=None,
|
||||
data=None,
|
||||
raw_data=None):
|
||||
raw_data=None) -> None:
|
||||
self.status_code = status_code
|
||||
self.headers = headers
|
||||
self.data = data
|
||||
|
@ -19,7 +19,6 @@ import sys
|
||||
import urllib3
|
||||
|
||||
import http.client as httplib
|
||||
from petstore_api.exceptions import ApiValueError
|
||||
|
||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
||||
@ -27,7 +26,7 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
||||
}
|
||||
|
||||
class Configuration(object):
|
||||
class Configuration:
|
||||
"""This class contains various settings of the API client.
|
||||
|
||||
:param host: Base url.
|
||||
@ -51,7 +50,8 @@ class Configuration(object):
|
||||
configuration.
|
||||
:param server_operation_variables: Mapping from operation ID to a mapping with
|
||||
string values to replace variables in templated server configuration.
|
||||
The validation of enums is performed for variables with defined enum values before.
|
||||
The validation of enums is performed for variables with defined enum
|
||||
values before.
|
||||
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
||||
in PEM format.
|
||||
|
||||
@ -142,7 +142,7 @@ conf = petstore_api.Configuration(
|
||||
server_index=None, server_variables=None,
|
||||
server_operation_index=None, server_operation_variables=None,
|
||||
ssl_ca_cert=None,
|
||||
):
|
||||
) -> None:
|
||||
"""Constructor
|
||||
"""
|
||||
self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host
|
||||
|
@ -18,7 +18,7 @@ class OpenApiException(Exception):
|
||||
|
||||
class ApiTypeError(OpenApiException, TypeError):
|
||||
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
||||
key_type=None):
|
||||
key_type=None) -> None:
|
||||
""" Raises an exception for TypeErrors
|
||||
|
||||
Args:
|
||||
@ -46,7 +46,7 @@ class ApiTypeError(OpenApiException, TypeError):
|
||||
|
||||
|
||||
class ApiValueError(OpenApiException, ValueError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -64,7 +64,7 @@ class ApiValueError(OpenApiException, ValueError):
|
||||
|
||||
|
||||
class ApiAttributeError(OpenApiException, AttributeError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Raised when an attribute reference or assignment fails.
|
||||
|
||||
@ -83,7 +83,7 @@ class ApiAttributeError(OpenApiException, AttributeError):
|
||||
|
||||
|
||||
class ApiKeyError(OpenApiException, KeyError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
def __init__(self, msg, path_to_item=None) -> None:
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
@ -101,7 +101,7 @@ class ApiKeyError(OpenApiException, KeyError):
|
||||
|
||||
class ApiException(OpenApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
if http_resp:
|
||||
self.status = http_resp.status
|
||||
self.reason = http_resp.reason
|
||||
@ -128,30 +128,30 @@ class ApiException(OpenApiException):
|
||||
|
||||
class BadRequestException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(BadRequestException, self).__init__(status, reason, http_resp)
|
||||
|
||||
class NotFoundException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(NotFoundException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class UnauthorizedException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ForbiddenException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ServiceException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
||||
super(ServiceException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ class AnyOfColor(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -45,7 +45,7 @@ class AnyOfPig(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -44,7 +44,7 @@ class Color(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -42,7 +42,7 @@ class IntOrString(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -44,7 +44,7 @@ class OneOfEnumString(BaseModel):
|
||||
class Config:
|
||||
validate_assignment = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -47,7 +47,7 @@ class Pig(BaseModel):
|
||||
discriminator_value_class_map = {
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
|
@ -29,7 +29,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class RESTResponse(io.IOBase):
|
||||
|
||||
def __init__(self, resp):
|
||||
def __init__(self, resp) -> None:
|
||||
self.urllib3_response = resp
|
||||
self.status = resp.status
|
||||
self.reason = resp.reason
|
||||
@ -44,9 +44,9 @@ class RESTResponse(io.IOBase):
|
||||
return self.urllib3_response.headers.get(name, default)
|
||||
|
||||
|
||||
class RESTClientObject(object):
|
||||
class RESTClientObject:
|
||||
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None):
|
||||
def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
|
||||
# urllib3.PoolManager will pass all kw parameters to connectionpool
|
||||
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
|
||||
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
|
||||
|
@ -66,7 +66,7 @@ HASH_SHA256 = 'sha256'
|
||||
HASH_SHA512 = 'sha512'
|
||||
|
||||
|
||||
class HttpSigningConfiguration(object):
|
||||
class HttpSigningConfiguration:
|
||||
"""The configuration parameters for the HTTP signature security scheme.
|
||||
The HTTP signature security scheme is used to sign HTTP requests with a private key
|
||||
which is in possession of the API client.
|
||||
@ -122,7 +122,7 @@ class HttpSigningConfiguration(object):
|
||||
signed_headers=None,
|
||||
signing_algorithm=None,
|
||||
hash_algorithm=None,
|
||||
signature_max_validity=None):
|
||||
signature_max_validity=None) -> None:
|
||||
self.key_id = key_id
|
||||
if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}:
|
||||
raise Exception("Unsupported security scheme: {0}".format(signing_scheme))
|
||||
|
Loading…
x
Reference in New Issue
Block a user