forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 5.4.x
This commit is contained in:
@@ -95,6 +95,7 @@ class AnotherFakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -112,7 +113,8 @@ class AnotherFakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -148,8 +150,10 @@ class AnotherFakeApi(object):
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json'],
|
||||
'PATCH', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
|
||||
@@ -95,6 +95,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -112,7 +113,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -144,8 +146,10 @@ class FakeApi(object):
|
||||
if 'xml_item' in local_var_params:
|
||||
body_params = local_var_params['xml_item']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -228,6 +232,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -245,7 +250,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -359,6 +365,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -376,7 +383,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -490,6 +498,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -507,7 +516,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -621,6 +631,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -638,7 +649,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -752,6 +764,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -769,7 +782,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -801,8 +815,10 @@ class FakeApi(object):
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json'],
|
||||
'PUT', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -887,6 +903,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -905,7 +922,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -943,8 +961,10 @@ class FakeApi(object):
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json'],
|
||||
'PUT', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -1027,6 +1047,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1044,7 +1065,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1080,8 +1102,10 @@ class FakeApi(object):
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json'],
|
||||
'PATCH', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -1218,6 +1242,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1248,7 +1273,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1346,8 +1372,10 @@ class FakeApi(object):
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/x-www-form-urlencoded']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/x-www-form-urlencoded'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['http_basic_test'] # noqa: E501
|
||||
@@ -1458,6 +1486,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1482,7 +1511,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1527,8 +1557,10 @@ class FakeApi(object):
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/x-www-form-urlencoded']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/x-www-form-urlencoded'],
|
||||
'GET', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -1631,6 +1663,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1653,7 +1686,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1781,6 +1815,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1798,7 +1833,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1830,8 +1866,10 @@ class FakeApi(object):
|
||||
if 'param' in local_var_params:
|
||||
body_params = local_var_params['param']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -1916,6 +1954,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1934,7 +1973,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1972,8 +2012,10 @@ class FakeApi(object):
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/x-www-form-urlencoded']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/x-www-form-urlencoded'],
|
||||
'GET', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
@@ -2072,6 +2114,7 @@ class FakeApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -2093,7 +2136,8 @@ class FakeApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ class FakeClassnameTags123Api(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -112,7 +113,8 @@ class FakeClassnameTags123Api(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -148,8 +150,10 @@ class FakeClassnameTags123Api(object):
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json'],
|
||||
'PATCH', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key_query'] # noqa: E501
|
||||
|
||||
@@ -93,6 +93,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -110,7 +111,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -142,8 +144,10 @@ class PetApi(object):
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'application/xml']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json', 'application/xml'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth'] # noqa: E501
|
||||
@@ -228,6 +232,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -246,7 +251,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -360,6 +366,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -377,7 +384,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -497,6 +505,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -514,7 +523,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -634,6 +644,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -651,7 +662,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -769,6 +781,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -786,7 +799,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -818,8 +832,10 @@ class PetApi(object):
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'application/xml']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json', 'application/xml'],
|
||||
'PUT', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth'] # noqa: E501
|
||||
@@ -908,6 +924,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -927,7 +944,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -963,8 +981,10 @@ class PetApi(object):
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/x-www-form-urlencoded']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/x-www-form-urlencoded'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth'] # noqa: E501
|
||||
@@ -1053,6 +1073,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1072,7 +1093,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1112,8 +1134,10 @@ class PetApi(object):
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['multipart/form-data']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['multipart/form-data'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth'] # noqa: E501
|
||||
@@ -1204,6 +1228,7 @@ class PetApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1223,7 +1248,8 @@ class PetApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1267,8 +1293,10 @@ class PetApi(object):
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['multipart/form-data']) # noqa: E501
|
||||
header_params['Content-Type'] = local_var_params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['multipart/form-data'],
|
||||
'POST', body_params)) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth'] # noqa: E501
|
||||
|
||||
@@ -95,6 +95,7 @@ class StoreApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -112,7 +113,8 @@ class StoreApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -220,6 +222,7 @@ class StoreApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -236,7 +239,8 @@ class StoreApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -348,6 +352,7 @@ class StoreApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -365,7 +370,8 @@ class StoreApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -487,6 +493,7 @@ class StoreApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -504,7 +511,8 @@ class StoreApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -112,7 +113,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -222,6 +224,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -239,7 +242,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -349,6 +353,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -366,7 +371,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -478,6 +484,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -495,7 +502,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -605,6 +613,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -622,7 +631,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -744,6 +754,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -762,7 +773,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -881,6 +893,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -897,7 +910,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1007,6 +1021,7 @@ class UserApi(object):
|
||||
request; this effectively ignores the authentication
|
||||
in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@@ -1025,7 +1040,8 @@ class UserApi(object):
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth'
|
||||
'_request_auth',
|
||||
'_content_type'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -522,10 +522,12 @@ class ApiClient(object):
|
||||
else:
|
||||
return ', '.join(accepts)
|
||||
|
||||
def select_header_content_type(self, content_types):
|
||||
def select_header_content_type(self, content_types, method=None, body=None):
|
||||
"""Returns `Content-Type` based on an array of content_types provided.
|
||||
|
||||
:param content_types: List of content-types.
|
||||
:param method: http method (e.g. POST, PATCH).
|
||||
:param body: http body to send.
|
||||
:return: Content-Type (e.g. application/json).
|
||||
"""
|
||||
if not content_types:
|
||||
@@ -533,6 +535,11 @@ class ApiClient(object):
|
||||
|
||||
content_types = [x.lower() for x in content_types]
|
||||
|
||||
if (method == 'PATCH' and
|
||||
'application/json-patch+json' in content_types and
|
||||
isinstance(body, list)):
|
||||
return 'application/json-patch+json'
|
||||
|
||||
if 'application/json' in content_types or '*/*' in content_types:
|
||||
return 'application/json'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user