mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-18 15:54:42 +00:00
updated ApiClient of python sdk.
Change staticmethod to instance method.
This commit is contained in:
@@ -29,8 +29,6 @@ from six import iteritems
|
||||
|
||||
from ..util import remove_none
|
||||
|
||||
from ..swagger import ApiClient
|
||||
|
||||
from .. import config
|
||||
|
||||
{{#operations}}
|
||||
@@ -76,12 +74,12 @@ class {{classname}}(object):
|
||||
body_params = {{#bodyParam}}params.get('{{paramName}}'){{/bodyParam}}{{^bodyParam}}None{{/bodyParam}}
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = ApiClient.select_header_accept([{{#produces}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/produces}}])
|
||||
header_params['Accept'] = self.api_client.select_header_accept([{{#produces}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/produces}}])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = ApiClient.select_header_content_type([{{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}])
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type([{{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}])
|
||||
|
||||
response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params,
|
||||
body=body_params, post_params=form_params, files=files,
|
||||
|
||||
Reference in New Issue
Block a user