forked from loafle/openapi-generator-original
enable python api client to return just data without http header info when need;
This commit is contained in:
parent
10de0b5c5b
commit
67c3f98d96
@ -48,6 +48,7 @@ class {{classname}}(object):
|
||||
{{#operation}}
|
||||
|
||||
def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
{{{summary}}}
|
||||
{{{notes}}}
|
||||
@ -74,10 +75,11 @@ class {{classname}}(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs)
|
||||
(data) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs)
|
||||
return data
|
||||
|
||||
def {{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs):
|
||||
@ -110,6 +112,7 @@ class {{classname}}(object):
|
||||
|
||||
all_params = [{{#allParams}}'{{paramName}}'{{#hasMore}}, {{/hasMore}}{{/allParams}}]
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -183,6 +186,7 @@ class {{classname}}(object):
|
||||
files=local_var_files,
|
||||
response_type={{#returnType}}'{{returnType}}'{{/returnType}}{{^returnType}}None{{/returnType}},
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
{{/operation}}
|
||||
{{/operations}}
|
||||
|
@ -103,7 +103,7 @@ class ApiClient(object):
|
||||
def __call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, callback=None):
|
||||
response_type=None, auth_settings=None, callback=None, _return_http_data_only=None):
|
||||
|
||||
# headers parameters
|
||||
header_params = header_params or {}
|
||||
@ -157,9 +157,12 @@ class ApiClient(object):
|
||||
deserialized_data = None
|
||||
|
||||
if callback:
|
||||
callback((deserialized_data, response_data.status, response_data.getheaders()))
|
||||
callback(deserialized_data) if _return_http_data_only else callback((deserialized_data, response_data.status, response_data.getheaders()))
|
||||
elif _return_http_data_only:
|
||||
return ( deserialized_data );
|
||||
else:
|
||||
return (deserialized_data, response_data.status, response_data.getheaders())
|
||||
|
||||
|
||||
def to_path_value(self, obj):
|
||||
"""
|
||||
@ -287,7 +290,7 @@ class ApiClient(object):
|
||||
def call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, callback=None):
|
||||
response_type=None, auth_settings=None, callback=None, _return_http_data_only=None):
|
||||
"""
|
||||
Makes the HTTP request (synchronous) and return the deserialized data.
|
||||
To make an async request, define a function for callback.
|
||||
@ -308,6 +311,7 @@ class ApiClient(object):
|
||||
:param callback function: Callback function for asynchronous request.
|
||||
If provide this parameter,
|
||||
the request will be called asynchronously.
|
||||
:param _return_http_data_only: response data without head status code and headers
|
||||
:return:
|
||||
If provide parameter callback,
|
||||
the request will be called asynchronously.
|
||||
@ -319,7 +323,7 @@ class ApiClient(object):
|
||||
return self.__call_api(resource_path, method,
|
||||
path_params, query_params, header_params,
|
||||
body, post_params, files,
|
||||
response_type, auth_settings, callback)
|
||||
response_type, auth_settings, callback, _return_http_data_only)
|
||||
else:
|
||||
thread = threading.Thread(target=self.__call_api,
|
||||
args=(resource_path, method,
|
||||
@ -327,7 +331,7 @@ class ApiClient(object):
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type, auth_settings,
|
||||
callback))
|
||||
callback,_return_http_data_only))
|
||||
thread.start()
|
||||
return thread
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,260 +1,16 @@
|
||||
Collecting nose (from -r dev-requirements.txt (line 1))
|
||||
Using cached nose-1.3.7-py2-none-any.whl
|
||||
Downloading nose-1.3.7-py2-none-any.whl (154kB)
|
||||
Collecting tox (from -r dev-requirements.txt (line 2))
|
||||
Using cached tox-2.1.1-py2.py3-none-any.whl
|
||||
Downloading tox-2.3.1-py2.py3-none-any.whl (40kB)
|
||||
Collecting coverage (from -r dev-requirements.txt (line 3))
|
||||
Downloading coverage-4.1-cp27-cp27m-macosx_10_10_x86_64.whl (164kB)
|
||||
Collecting randomize (from -r dev-requirements.txt (line 4))
|
||||
Using cached randomize-0.13-py2.py3-none-any.whl
|
||||
Downloading randomize-0.13-py2.py3-none-any.whl
|
||||
Collecting virtualenv>=1.11.2 (from tox->-r dev-requirements.txt (line 2))
|
||||
Using cached virtualenv-13.1.2-py2.py3-none-any.whl
|
||||
Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2))
|
||||
Using cached py-1.4.30-py2.py3-none-any.whl
|
||||
Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2))
|
||||
Using cached pluggy-0.3.0-py2.py3-none-any.whl
|
||||
Installing collected packages: nose, virtualenv, py, pluggy, tox, coverage, randomize
|
||||
Successfully installed coverage-3.7.1 nose-1.3.7 pluggy-0.3.0 py-1.4.30 randomize-0.13 tox-2.1.1 virtualenv-13.1.2
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./.venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./.venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./.venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Collecting nose (from -r dev-requirements.txt (line 1))
|
||||
Using cached nose-1.3.7-py2-none-any.whl
|
||||
Collecting tox (from -r dev-requirements.txt (line 2))
|
||||
Using cached tox-2.2.1-py2.py3-none-any.whl
|
||||
Collecting coverage (from -r dev-requirements.txt (line 3))
|
||||
Downloading coverage-4.0.3.tar.gz (354kB)
|
||||
Collecting randomize (from -r dev-requirements.txt (line 4))
|
||||
Using cached randomize-0.13-py2.py3-none-any.whl
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /Library/Python/2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Downloading virtualenv-15.0.2-py2.py3-none-any.whl (1.8MB)
|
||||
Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2))
|
||||
Downloading py-1.4.31-py2.py3-none-any.whl (81kB)
|
||||
Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2))
|
||||
Using cached pluggy-0.3.1-py2.py3-none-any.whl
|
||||
Installing collected packages: nose, py, pluggy, tox, coverage, randomize
|
||||
Collecting nose (from -r dev-requirements.txt (line 1))
|
||||
Using cached nose-1.3.7-py2-none-any.whl
|
||||
Collecting tox (from -r dev-requirements.txt (line 2))
|
||||
Using cached tox-2.2.1-py2.py3-none-any.whl
|
||||
Collecting coverage (from -r dev-requirements.txt (line 3))
|
||||
Using cached coverage-4.0.3.tar.gz
|
||||
Collecting randomize (from -r dev-requirements.txt (line 4))
|
||||
Using cached randomize-0.13-py2.py3-none-any.whl
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /Library/Python/2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2))
|
||||
Using cached py-1.4.31-py2.py3-none-any.whl
|
||||
Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2))
|
||||
Using cached pluggy-0.3.1-py2.py3-none-any.whl
|
||||
Installing collected packages: nose, py, pluggy, tox, coverage, randomize
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1))
|
||||
Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3))
|
||||
Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4))
|
||||
Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2))
|
||||
Downloading pluggy-0.3.1-py2.py3-none-any.whl
|
||||
Installing collected packages: nose, virtualenv, py, pluggy, tox, coverage, randomize
|
||||
Successfully installed coverage-4.1 nose-1.3.7 pluggy-0.3.1 py-1.4.31 randomize-0.13 tox-2.3.1 virtualenv-15.0.2
|
||||
|
@ -103,7 +103,7 @@ class ApiClient(object):
|
||||
def __call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, callback=None):
|
||||
response_type=None, auth_settings=None, callback=None, _return_http_data_only=None):
|
||||
|
||||
# headers parameters
|
||||
header_params = header_params or {}
|
||||
@ -157,9 +157,12 @@ class ApiClient(object):
|
||||
deserialized_data = None
|
||||
|
||||
if callback:
|
||||
callback((deserialized_data, response_data.status, response_data.getheaders()))
|
||||
callback(deserialized_data) if _return_http_data_only else callback((deserialized_data, response_data.status, response_data.getheaders()))
|
||||
elif _return_http_data_only:
|
||||
return ( deserialized_data );
|
||||
else:
|
||||
return (deserialized_data, response_data.status, response_data.getheaders())
|
||||
|
||||
|
||||
def to_path_value(self, obj):
|
||||
"""
|
||||
@ -287,7 +290,7 @@ class ApiClient(object):
|
||||
def call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, callback=None):
|
||||
response_type=None, auth_settings=None, callback=None, _return_http_data_only=None):
|
||||
"""
|
||||
Makes the HTTP request (synchronous) and return the deserialized data.
|
||||
To make an async request, define a function for callback.
|
||||
@ -308,6 +311,7 @@ class ApiClient(object):
|
||||
:param callback function: Callback function for asynchronous request.
|
||||
If provide this parameter,
|
||||
the request will be called asynchronously.
|
||||
:param _return_http_data_only: response data without head status code and headers
|
||||
:return:
|
||||
If provide parameter callback,
|
||||
the request will be called asynchronously.
|
||||
@ -319,7 +323,7 @@ class ApiClient(object):
|
||||
return self.__call_api(resource_path, method,
|
||||
path_params, query_params, header_params,
|
||||
body, post_params, files,
|
||||
response_type, auth_settings, callback)
|
||||
response_type, auth_settings, callback, _return_http_data_only)
|
||||
else:
|
||||
thread = threading.Thread(target=self.__call_api,
|
||||
args=(resource_path, method,
|
||||
@ -327,7 +331,7 @@ class ApiClient(object):
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type, auth_settings,
|
||||
callback))
|
||||
callback,_return_http_data_only))
|
||||
thread.start()
|
||||
return thread
|
||||
|
||||
|
@ -46,6 +46,7 @@ class PetApi(object):
|
||||
self.api_client = config.api_client
|
||||
|
||||
def add_pet(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Add a new pet to the store
|
||||
|
||||
@ -65,10 +66,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.add_pet_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.add_pet_with_http_info(**kwargs)
|
||||
(data) = self.add_pet_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def add_pet_with_http_info(self, **kwargs):
|
||||
@ -94,6 +96,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -142,9 +145,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def add_pet_using_byte_array(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
@ -164,10 +169,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.add_pet_using_byte_array_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.add_pet_using_byte_array_with_http_info(**kwargs)
|
||||
(data) = self.add_pet_using_byte_array_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def add_pet_using_byte_array_with_http_info(self, **kwargs):
|
||||
@ -193,6 +199,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -241,9 +248,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def delete_pet(self, pet_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Deletes a pet
|
||||
|
||||
@ -264,10 +273,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.delete_pet_with_http_info(pet_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.delete_pet_with_http_info(pet_id, **kwargs)
|
||||
(data) = self.delete_pet_with_http_info(pet_id, **kwargs)
|
||||
return data
|
||||
|
||||
def delete_pet_with_http_info(self, pet_id, **kwargs):
|
||||
@ -294,6 +304,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['pet_id', 'api_key']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -347,9 +358,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def find_pets_by_status(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Finds Pets by status
|
||||
Multiple status values can be provided with comma separated strings
|
||||
@ -369,10 +382,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.find_pets_by_status_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.find_pets_by_status_with_http_info(**kwargs)
|
||||
(data) = self.find_pets_by_status_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def find_pets_by_status_with_http_info(self, **kwargs):
|
||||
@ -398,6 +412,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['status']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -446,9 +461,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type='list[Pet]',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def find_pets_by_tags(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Finds Pets by tags
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -468,10 +485,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.find_pets_by_tags_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.find_pets_by_tags_with_http_info(**kwargs)
|
||||
(data) = self.find_pets_by_tags_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def find_pets_by_tags_with_http_info(self, **kwargs):
|
||||
@ -497,6 +515,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['tags']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -545,9 +564,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type='list[Pet]',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def get_pet_by_id(self, pet_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Find pet by ID
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@ -567,10 +588,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.get_pet_by_id_with_http_info(pet_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.get_pet_by_id_with_http_info(pet_id, **kwargs)
|
||||
(data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs)
|
||||
return data
|
||||
|
||||
def get_pet_by_id_with_http_info(self, pet_id, **kwargs):
|
||||
@ -596,6 +618,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['pet_id']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -647,9 +670,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type='Pet',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def get_pet_by_id_in_object(self, pet_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@ -669,10 +694,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.get_pet_by_id_in_object_with_http_info(pet_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.get_pet_by_id_in_object_with_http_info(pet_id, **kwargs)
|
||||
(data) = self.get_pet_by_id_in_object_with_http_info(pet_id, **kwargs)
|
||||
return data
|
||||
|
||||
def get_pet_by_id_in_object_with_http_info(self, pet_id, **kwargs):
|
||||
@ -698,6 +724,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['pet_id']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -749,9 +776,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse200',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def pet_pet_idtesting_byte_arraytrue_get(self, pet_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@ -771,10 +800,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.pet_pet_idtesting_byte_arraytrue_get_with_http_info(pet_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.pet_pet_idtesting_byte_arraytrue_get_with_http_info(pet_id, **kwargs)
|
||||
(data) = self.pet_pet_idtesting_byte_arraytrue_get_with_http_info(pet_id, **kwargs)
|
||||
return data
|
||||
|
||||
def pet_pet_idtesting_byte_arraytrue_get_with_http_info(self, pet_id, **kwargs):
|
||||
@ -800,6 +830,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['pet_id']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -851,9 +882,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type='str',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def update_pet(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Update an existing pet
|
||||
|
||||
@ -873,10 +906,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.update_pet_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.update_pet_with_http_info(**kwargs)
|
||||
(data) = self.update_pet_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def update_pet_with_http_info(self, **kwargs):
|
||||
@ -902,6 +936,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -950,9 +985,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def update_pet_with_form(self, pet_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Updates a pet in the store with form data
|
||||
|
||||
@ -974,10 +1011,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.update_pet_with_form_with_http_info(pet_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.update_pet_with_form_with_http_info(pet_id, **kwargs)
|
||||
(data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs)
|
||||
return data
|
||||
|
||||
def update_pet_with_form_with_http_info(self, pet_id, **kwargs):
|
||||
@ -1005,6 +1043,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['pet_id', 'name', 'status']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -1060,9 +1099,11 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def upload_file(self, pet_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
uploads an image
|
||||
|
||||
@ -1084,10 +1125,11 @@ class PetApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.upload_file_with_http_info(pet_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.upload_file_with_http_info(pet_id, **kwargs)
|
||||
(data) = self.upload_file_with_http_info(pet_id, **kwargs)
|
||||
return data
|
||||
|
||||
def upload_file_with_http_info(self, pet_id, **kwargs):
|
||||
@ -1115,6 +1157,7 @@ class PetApi(object):
|
||||
|
||||
all_params = ['pet_id', 'additional_metadata', 'file']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -1170,4 +1213,5 @@ class PetApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
@ -46,6 +46,7 @@ class StoreApi(object):
|
||||
self.api_client = config.api_client
|
||||
|
||||
def delete_order(self, order_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Delete purchase order by ID
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@ -65,10 +66,11 @@ class StoreApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.delete_order_with_http_info(order_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.delete_order_with_http_info(order_id, **kwargs)
|
||||
(data) = self.delete_order_with_http_info(order_id, **kwargs)
|
||||
return data
|
||||
|
||||
def delete_order_with_http_info(self, order_id, **kwargs):
|
||||
@ -94,6 +96,7 @@ class StoreApi(object):
|
||||
|
||||
all_params = ['order_id']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -145,9 +148,11 @@ class StoreApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def find_orders_by_status(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Finds orders by status
|
||||
A single status value can be provided as a string
|
||||
@ -167,10 +172,11 @@ class StoreApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.find_orders_by_status_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.find_orders_by_status_with_http_info(**kwargs)
|
||||
(data) = self.find_orders_by_status_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def find_orders_by_status_with_http_info(self, **kwargs):
|
||||
@ -196,6 +202,7 @@ class StoreApi(object):
|
||||
|
||||
all_params = ['status']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -244,9 +251,11 @@ class StoreApi(object):
|
||||
files=local_var_files,
|
||||
response_type='list[Order]',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def get_inventory(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Returns pet inventories by status
|
||||
Returns a map of status codes to quantities
|
||||
@ -265,10 +274,11 @@ class StoreApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.get_inventory_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.get_inventory_with_http_info(**kwargs)
|
||||
(data) = self.get_inventory_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def get_inventory_with_http_info(self, **kwargs):
|
||||
@ -293,6 +303,7 @@ class StoreApi(object):
|
||||
|
||||
all_params = []
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -339,9 +350,11 @@ class StoreApi(object):
|
||||
files=local_var_files,
|
||||
response_type='dict(str, int)',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def get_inventory_in_object(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
@ -360,10 +373,11 @@ class StoreApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.get_inventory_in_object_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.get_inventory_in_object_with_http_info(**kwargs)
|
||||
(data) = self.get_inventory_in_object_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def get_inventory_in_object_with_http_info(self, **kwargs):
|
||||
@ -388,6 +402,7 @@ class StoreApi(object):
|
||||
|
||||
all_params = []
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -434,9 +449,11 @@ class StoreApi(object):
|
||||
files=local_var_files,
|
||||
response_type='object',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def get_order_by_id(self, order_id, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Find purchase order by ID
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -456,10 +473,11 @@ class StoreApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.get_order_by_id_with_http_info(order_id, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.get_order_by_id_with_http_info(order_id, **kwargs)
|
||||
(data) = self.get_order_by_id_with_http_info(order_id, **kwargs)
|
||||
return data
|
||||
|
||||
def get_order_by_id_with_http_info(self, order_id, **kwargs):
|
||||
@ -485,6 +503,7 @@ class StoreApi(object):
|
||||
|
||||
all_params = ['order_id']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -536,9 +555,11 @@ class StoreApi(object):
|
||||
files=local_var_files,
|
||||
response_type='Order',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def place_order(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Place an order for a pet
|
||||
|
||||
@ -558,10 +579,11 @@ class StoreApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.place_order_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.place_order_with_http_info(**kwargs)
|
||||
(data) = self.place_order_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def place_order_with_http_info(self, **kwargs):
|
||||
@ -587,6 +609,7 @@ class StoreApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -635,4 +658,5 @@ class StoreApi(object):
|
||||
files=local_var_files,
|
||||
response_type='Order',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
@ -46,6 +46,7 @@ class UserApi(object):
|
||||
self.api_client = config.api_client
|
||||
|
||||
def create_user(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Create user
|
||||
This can only be done by the logged in user.
|
||||
@ -65,10 +66,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.create_user_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.create_user_with_http_info(**kwargs)
|
||||
(data) = self.create_user_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def create_user_with_http_info(self, **kwargs):
|
||||
@ -94,6 +96,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -142,9 +145,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def create_users_with_array_input(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -164,10 +169,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.create_users_with_array_input_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.create_users_with_array_input_with_http_info(**kwargs)
|
||||
(data) = self.create_users_with_array_input_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def create_users_with_array_input_with_http_info(self, **kwargs):
|
||||
@ -193,6 +199,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -241,9 +248,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def create_users_with_list_input(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -263,10 +272,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.create_users_with_list_input_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.create_users_with_list_input_with_http_info(**kwargs)
|
||||
(data) = self.create_users_with_list_input_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def create_users_with_list_input_with_http_info(self, **kwargs):
|
||||
@ -292,6 +302,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -340,9 +351,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def delete_user(self, username, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Delete user
|
||||
This can only be done by the logged in user.
|
||||
@ -362,10 +375,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.delete_user_with_http_info(username, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.delete_user_with_http_info(username, **kwargs)
|
||||
(data) = self.delete_user_with_http_info(username, **kwargs)
|
||||
return data
|
||||
|
||||
def delete_user_with_http_info(self, username, **kwargs):
|
||||
@ -391,6 +405,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['username']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -442,9 +457,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def get_user_by_name(self, username, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Get user by user name
|
||||
|
||||
@ -464,10 +481,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.get_user_by_name_with_http_info(username, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.get_user_by_name_with_http_info(username, **kwargs)
|
||||
(data) = self.get_user_by_name_with_http_info(username, **kwargs)
|
||||
return data
|
||||
|
||||
def get_user_by_name_with_http_info(self, username, **kwargs):
|
||||
@ -493,6 +511,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['username']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -544,9 +563,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type='User',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def login_user(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Logs user into the system
|
||||
|
||||
@ -567,10 +588,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.login_user_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.login_user_with_http_info(**kwargs)
|
||||
(data) = self.login_user_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def login_user_with_http_info(self, **kwargs):
|
||||
@ -597,6 +619,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['username', 'password']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -647,9 +670,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type='str',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def logout_user(self, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Logs out current logged in user session
|
||||
|
||||
@ -668,10 +693,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.logout_user_with_http_info(**kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.logout_user_with_http_info(**kwargs)
|
||||
(data) = self.logout_user_with_http_info(**kwargs)
|
||||
return data
|
||||
|
||||
def logout_user_with_http_info(self, **kwargs):
|
||||
@ -696,6 +722,7 @@ class UserApi(object):
|
||||
|
||||
all_params = []
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -742,9 +769,11 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
||||
def update_user(self, username, **kwargs):
|
||||
_return_http_data_only = True
|
||||
"""
|
||||
Updated user
|
||||
This can only be done by the logged in user.
|
||||
@ -765,10 +794,11 @@ class UserApi(object):
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = _return_http_data_only
|
||||
if kwargs.get('callback'):
|
||||
return self.update_user_with_http_info(username, **kwargs)
|
||||
else:
|
||||
(data, status_code, response_headers) = self.update_user_with_http_info(username, **kwargs)
|
||||
(data) = self.update_user_with_http_info(username, **kwargs)
|
||||
return data
|
||||
|
||||
def update_user_with_http_info(self, username, **kwargs):
|
||||
@ -795,6 +825,7 @@ class UserApi(object):
|
||||
|
||||
all_params = ['username', 'body']
|
||||
all_params.append('callback')
|
||||
all_params.append('_return_http_data_only')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
@ -848,4 +879,5 @@ class UserApi(object):
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
callback=params.get('callback'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'))
|
||||
|
120
samples/client/petstore/python/swagger_client/models/animal.py
Normal file
120
samples/client/petstore/python/swagger_client/models/animal.py
Normal file
@ -0,0 +1,120 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
from six import iteritems
|
||||
|
||||
|
||||
class Animal(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Animal - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'class_name': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'class_name': 'className'
|
||||
}
|
||||
|
||||
self._class_name = None
|
||||
|
||||
@property
|
||||
def class_name(self):
|
||||
"""
|
||||
Gets the class_name of this Animal.
|
||||
|
||||
|
||||
:return: The class_name of this Animal.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._class_name
|
||||
|
||||
@class_name.setter
|
||||
def class_name(self, class_name):
|
||||
"""
|
||||
Sets the class_name of this Animal.
|
||||
|
||||
|
||||
:param class_name: The class_name of this Animal.
|
||||
:type: str
|
||||
"""
|
||||
self._class_name = class_name
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""
|
||||
For `print` and `pprint`
|
||||
"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""
|
||||
Returns true if both objects are equal
|
||||
"""
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""
|
||||
Returns true if both objects are not equal
|
||||
"""
|
||||
return not self == other
|
||||
|
145
samples/client/petstore/python/swagger_client/models/cat.py
Normal file
145
samples/client/petstore/python/swagger_client/models/cat.py
Normal file
@ -0,0 +1,145 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
from six import iteritems
|
||||
|
||||
|
||||
class Cat(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Cat - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'class_name': 'str',
|
||||
'declawed': 'bool'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'class_name': 'className',
|
||||
'declawed': 'declawed'
|
||||
}
|
||||
|
||||
self._class_name = None
|
||||
self._declawed = None
|
||||
|
||||
@property
|
||||
def class_name(self):
|
||||
"""
|
||||
Gets the class_name of this Cat.
|
||||
|
||||
|
||||
:return: The class_name of this Cat.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._class_name
|
||||
|
||||
@class_name.setter
|
||||
def class_name(self, class_name):
|
||||
"""
|
||||
Sets the class_name of this Cat.
|
||||
|
||||
|
||||
:param class_name: The class_name of this Cat.
|
||||
:type: str
|
||||
"""
|
||||
self._class_name = class_name
|
||||
|
||||
@property
|
||||
def declawed(self):
|
||||
"""
|
||||
Gets the declawed of this Cat.
|
||||
|
||||
|
||||
:return: The declawed of this Cat.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._declawed
|
||||
|
||||
@declawed.setter
|
||||
def declawed(self, declawed):
|
||||
"""
|
||||
Sets the declawed of this Cat.
|
||||
|
||||
|
||||
:param declawed: The declawed of this Cat.
|
||||
:type: bool
|
||||
"""
|
||||
self._declawed = declawed
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""
|
||||
For `print` and `pprint`
|
||||
"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""
|
||||
Returns true if both objects are equal
|
||||
"""
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""
|
||||
Returns true if both objects are not equal
|
||||
"""
|
||||
return not self == other
|
||||
|
145
samples/client/petstore/python/swagger_client/models/dog.py
Normal file
145
samples/client/petstore/python/swagger_client/models/dog.py
Normal file
@ -0,0 +1,145 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
from six import iteritems
|
||||
|
||||
|
||||
class Dog(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Dog - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'class_name': 'str',
|
||||
'breed': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'class_name': 'className',
|
||||
'breed': 'breed'
|
||||
}
|
||||
|
||||
self._class_name = None
|
||||
self._breed = None
|
||||
|
||||
@property
|
||||
def class_name(self):
|
||||
"""
|
||||
Gets the class_name of this Dog.
|
||||
|
||||
|
||||
:return: The class_name of this Dog.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._class_name
|
||||
|
||||
@class_name.setter
|
||||
def class_name(self, class_name):
|
||||
"""
|
||||
Sets the class_name of this Dog.
|
||||
|
||||
|
||||
:param class_name: The class_name of this Dog.
|
||||
:type: str
|
||||
"""
|
||||
self._class_name = class_name
|
||||
|
||||
@property
|
||||
def breed(self):
|
||||
"""
|
||||
Gets the breed of this Dog.
|
||||
|
||||
|
||||
:return: The breed of this Dog.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._breed
|
||||
|
||||
@breed.setter
|
||||
def breed(self, breed):
|
||||
"""
|
||||
Sets the breed of this Dog.
|
||||
|
||||
|
||||
:param breed: The breed of this Dog.
|
||||
:type: str
|
||||
"""
|
||||
self._breed = breed
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""
|
||||
For `print` and `pprint`
|
||||
"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""
|
||||
Returns true if both objects are equal
|
||||
"""
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""
|
||||
Returns true if both objects are not equal
|
||||
"""
|
||||
return not self == other
|
||||
|
@ -97,6 +97,15 @@ class PetApiTests(unittest.TestCase):
|
||||
self.assertIsNotNone(fetched.category)
|
||||
self.assertEqual(self.pet.category.name, fetched.category.name)
|
||||
|
||||
def test_add_pet_and_get_pet_by_id_with_http_info(self):
|
||||
self.pet_api.add_pet(body=self.pet)
|
||||
|
||||
fetched = self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id)
|
||||
self.assertIsNotNone(fetched)
|
||||
self.assertEqual(self.pet.id, fetched[0].id)
|
||||
self.assertIsNotNone(fetched[0].category)
|
||||
self.assertEqual(self.pet.category.name, fetched[0].category.name)
|
||||
|
||||
def test_update_pet(self):
|
||||
self.pet.name = "hello kity with updated"
|
||||
self.pet_api.update_pet(body=self.pet)
|
||||
|
Loading…
x
Reference in New Issue
Block a user