forked from loafle/openapi-generator-original
Merge branch 'master' into new-sync-master-to-2.3.0
This commit is contained in:
@@ -108,7 +108,6 @@ class FakeApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/fake'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -132,7 +131,7 @@ class FakeApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'PATCH',
|
||||
return self.api_client.call_api('/fake', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -276,7 +275,6 @@ class FakeApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/fake'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -326,7 +324,7 @@ class FakeApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['http_basic_test']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/fake', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -420,7 +418,6 @@ class FakeApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/fake'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -461,7 +458,7 @@ class FakeApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/fake', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
|
||||
@@ -108,7 +108,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -132,7 +131,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/pet', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -217,7 +216,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet/{petId}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'pet_id' in params:
|
||||
path_params['petId'] = params['pet_id']
|
||||
@@ -239,7 +237,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'DELETE',
|
||||
return self.api_client.call_api('/pet/{petId}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -322,7 +320,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet/findByStatus'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -343,7 +340,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/pet/findByStatus', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -426,7 +423,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet/findByTags'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -447,7 +443,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/pet/findByTags', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -530,7 +526,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet/{petId}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'pet_id' in params:
|
||||
path_params['petId'] = params['pet_id']
|
||||
@@ -550,7 +545,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/pet/{petId}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -633,7 +628,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -657,7 +651,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'PUT',
|
||||
return self.api_client.call_api('/pet', 'PUT',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -744,7 +738,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet/{petId}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'pet_id' in params:
|
||||
path_params['petId'] = params['pet_id']
|
||||
@@ -772,7 +765,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/pet/{petId}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -859,7 +852,6 @@ class PetApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/pet/{petId}/uploadImage'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'pet_id' in params:
|
||||
path_params['petId'] = params['pet_id']
|
||||
@@ -887,7 +879,7 @@ class PetApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/pet/{petId}/uploadImage', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
|
||||
@@ -108,7 +108,6 @@ class StoreApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/store/order/{orderId}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'order_id' in params:
|
||||
path_params['orderId'] = params['order_id']
|
||||
@@ -128,7 +127,7 @@ class StoreApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'DELETE',
|
||||
return self.api_client.call_api('/store/order/{orderId}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -205,7 +204,6 @@ class StoreApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/store/inventory'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -223,7 +221,7 @@ class StoreApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key']
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/store/inventory', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -310,7 +308,6 @@ class StoreApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/store/order/{orderId}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'order_id' in params:
|
||||
path_params['orderId'] = params['order_id']
|
||||
@@ -330,7 +327,7 @@ class StoreApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/store/order/{orderId}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -413,7 +410,6 @@ class StoreApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/store/order'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -433,7 +429,7 @@ class StoreApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/store/order', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
|
||||
@@ -108,7 +108,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -128,7 +127,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/user', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -211,7 +210,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/createWithArray'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -231,7 +229,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/user/createWithArray', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -314,7 +312,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/createWithList'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -334,7 +331,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'POST',
|
||||
return self.api_client.call_api('/user/createWithList', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -417,7 +414,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/{username}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'username' in params:
|
||||
path_params['username'] = params['username']
|
||||
@@ -437,7 +433,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'DELETE',
|
||||
return self.api_client.call_api('/user/{username}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -520,7 +516,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/{username}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'username' in params:
|
||||
path_params['username'] = params['username']
|
||||
@@ -540,7 +535,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/user/{username}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -628,7 +623,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/login'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -650,7 +644,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/user/login', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -727,7 +721,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/logout'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
@@ -745,7 +738,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'GET',
|
||||
return self.api_client.call_api('/user/logout', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
@@ -833,7 +826,6 @@ class UserApi(object):
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
resource_path = '/user/{username}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'username' in params:
|
||||
path_params['username'] = params['username']
|
||||
@@ -855,7 +847,7 @@ class UserApi(object):
|
||||
# Authentication setting
|
||||
auth_settings = []
|
||||
|
||||
return self.api_client.call_api(resource_path, 'PUT',
|
||||
return self.api_client.call_api('/user/{username}', 'PUT',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
|
||||
@@ -89,6 +89,9 @@ class Configuration(object):
|
||||
# client key file
|
||||
self.key_file = None
|
||||
|
||||
# Proxy URL
|
||||
self.proxy = None
|
||||
|
||||
@property
|
||||
def logger_file(self):
|
||||
"""
|
||||
|
||||
@@ -85,15 +85,30 @@ class RESTClientObject(object):
|
||||
# key file
|
||||
key_file = Configuration().key_file
|
||||
|
||||
# proxy
|
||||
proxy = Configuration().proxy
|
||||
|
||||
# https pool manager
|
||||
self.pool_manager = urllib3.PoolManager(
|
||||
num_pools=pools_size,
|
||||
maxsize=maxsize,
|
||||
cert_reqs=cert_reqs,
|
||||
ca_certs=ca_certs,
|
||||
cert_file=cert_file,
|
||||
key_file=key_file
|
||||
)
|
||||
if proxy:
|
||||
self.pool_manager = urllib3.ProxyManager(
|
||||
num_pools=pools_size,
|
||||
maxsize=maxsize,
|
||||
cert_reqs=cert_reqs,
|
||||
ca_certs=ca_certs,
|
||||
cert_file=cert_file,
|
||||
key_file=key_file,
|
||||
proxy_url=proxy
|
||||
)
|
||||
else:
|
||||
self.pool_manager = urllib3.PoolManager(
|
||||
num_pools=pools_size,
|
||||
maxsize=maxsize,
|
||||
cert_reqs=cert_reqs,
|
||||
ca_certs=ca_certs,
|
||||
cert_file=cert_file,
|
||||
key_file=key_file
|
||||
)
|
||||
|
||||
|
||||
def request(self, method, url, query_params=None, headers=None,
|
||||
body=None, post_params=None, _preload_content=True, _request_timeout=None):
|
||||
|
||||
Reference in New Issue
Block a user