forked from loafle/openapi-generator-original
Updated template so that generated code now renders docstrings and function parameters nicely in IDE. (#10331)
Endpoints are still accessible in generated code, mainly to satisfy some test cases.
This commit is contained in:
@@ -35,74 +35,7 @@ class AnotherFakeApi(object):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def __call_123_test_special_tags(
|
||||
self,
|
||||
client,
|
||||
**kwargs
|
||||
):
|
||||
"""To test special tags # noqa: E501
|
||||
|
||||
To test special tags and operation ID starting with number # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.call_123_test_special_tags(client, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
client (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['client'] = \
|
||||
client
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.call_123_test_special_tags = _Endpoint(
|
||||
self.call_123_test_special_tags_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Client,),
|
||||
'auth': [],
|
||||
@@ -150,6 +83,72 @@ class AnotherFakeApi(object):
|
||||
'application/json'
|
||||
]
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__call_123_test_special_tags
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def call_123_test_special_tags(
|
||||
self,
|
||||
client,
|
||||
**kwargs
|
||||
):
|
||||
"""To test special tags # noqa: E501
|
||||
|
||||
To test special tags and operation ID starting with number # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.call_123_test_special_tags(client, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
client (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['client'] = \
|
||||
client
|
||||
return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
|
||||
@@ -35,68 +35,7 @@ class DefaultApi(object):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def __foo_get(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
"""foo_get # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.foo_get(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
InlineResponseDefault
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.foo_get = _Endpoint(
|
||||
self.foo_get_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (InlineResponseDefault,),
|
||||
'auth': [],
|
||||
@@ -136,6 +75,66 @@ class DefaultApi(object):
|
||||
],
|
||||
'content_type': [],
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__foo_get
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def foo_get(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
"""foo_get # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.foo_get(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
InlineResponseDefault
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.foo_get_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,74 +35,7 @@ class FakeClassnameTags123Api(object):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def __test_classname(
|
||||
self,
|
||||
client,
|
||||
**kwargs
|
||||
):
|
||||
"""To test class name in snake case # noqa: E501
|
||||
|
||||
To test class name in snake case # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.test_classname(client, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
client (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['client'] = \
|
||||
client
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_classname = _Endpoint(
|
||||
self.test_classname_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Client,),
|
||||
'auth': [
|
||||
@@ -152,6 +85,72 @@ class FakeClassnameTags123Api(object):
|
||||
'application/json'
|
||||
]
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__test_classname
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def test_classname(
|
||||
self,
|
||||
client,
|
||||
**kwargs
|
||||
):
|
||||
"""To test class name in snake case # noqa: E501
|
||||
|
||||
To test class name in snake case # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.test_classname(client, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
client (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['client'] = \
|
||||
client
|
||||
return self.test_classname_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,74 +35,7 @@ class StoreApi(object):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def __delete_order(
|
||||
self,
|
||||
order_id,
|
||||
**kwargs
|
||||
):
|
||||
"""Delete purchase order by ID # noqa: E501
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.delete_order(order_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
order_id (str): ID of the order that needs to be deleted
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
None
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['order_id'] = \
|
||||
order_id
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.delete_order = _Endpoint(
|
||||
self.delete_order_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -147,72 +80,9 @@ class StoreApi(object):
|
||||
'accept': [],
|
||||
'content_type': [],
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__delete_order
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def __get_inventory(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
"""Returns pet inventories by status # noqa: E501
|
||||
|
||||
Returns a map of status codes to quantities # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.get_inventory(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
{str: (int,)}
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.get_inventory = _Endpoint(
|
||||
self.get_inventory_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': ({str: (int,)},),
|
||||
'auth': [
|
||||
@@ -254,77 +124,9 @@ class StoreApi(object):
|
||||
],
|
||||
'content_type': [],
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__get_inventory
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def __get_order_by_id(
|
||||
self,
|
||||
order_id,
|
||||
**kwargs
|
||||
):
|
||||
"""Find purchase order by ID # noqa: E501
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.get_order_by_id(order_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
order_id (int): ID of pet that needs to be fetched
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Order
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['order_id'] = \
|
||||
order_id
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.get_order_by_id = _Endpoint(
|
||||
self.get_order_by_id_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Order,),
|
||||
'auth': [],
|
||||
@@ -378,76 +180,9 @@ class StoreApi(object):
|
||||
],
|
||||
'content_type': [],
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__get_order_by_id
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def __place_order(
|
||||
self,
|
||||
order,
|
||||
**kwargs
|
||||
):
|
||||
"""Place an order for a pet # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.place_order(order, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
order (Order): order placed for purchasing the pet
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Order
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['order'] = \
|
||||
order
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.place_order = _Endpoint(
|
||||
self.place_order_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Order,),
|
||||
'auth': [],
|
||||
@@ -496,6 +231,264 @@ class StoreApi(object):
|
||||
'application/json'
|
||||
]
|
||||
},
|
||||
api_client=api_client,
|
||||
callable=__place_order
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def delete_order(
|
||||
self,
|
||||
order_id,
|
||||
**kwargs
|
||||
):
|
||||
"""Delete purchase order by ID # noqa: E501
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.delete_order(order_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
order_id (str): ID of the order that needs to be deleted
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
None
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['order_id'] = \
|
||||
order_id
|
||||
return self.delete_order_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
def get_inventory(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
"""Returns pet inventories by status # noqa: E501
|
||||
|
||||
Returns a map of status codes to quantities # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.get_inventory(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
{str: (int,)}
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.get_inventory_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
def get_order_by_id(
|
||||
self,
|
||||
order_id,
|
||||
**kwargs
|
||||
):
|
||||
"""Find purchase order by ID # noqa: E501
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.get_order_by_id(order_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
order_id (int): ID of pet that needs to be fetched
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Order
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['order_id'] = \
|
||||
order_id
|
||||
return self.get_order_by_id_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
def place_order(
|
||||
self,
|
||||
order,
|
||||
**kwargs
|
||||
):
|
||||
"""Place an order for a pet # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.place_order(order, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
order (Order): order placed for purchasing the pet
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
Order
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['order'] = \
|
||||
order
|
||||
return self.place_order_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user