forked from loafle/openapi-generator-original
rebuild python client
This commit is contained in:
@@ -27,6 +27,7 @@ import os
|
||||
# python 2 and python 3 compatibility library
|
||||
from six import iteritems
|
||||
|
||||
from .. import configuration
|
||||
from ..api_client import ApiClient
|
||||
|
||||
{{#operations}}
|
||||
@@ -36,7 +37,10 @@ class {{classname}}(object):
|
||||
if api_client:
|
||||
self.api_client = api_client
|
||||
else:
|
||||
self.api_client = config.api_client
|
||||
if not configuration.api_client:
|
||||
configuration.api_client = ApiClient('{{basePath}}')
|
||||
self.api_client = configuration.api_client
|
||||
|
||||
{{#operation}}
|
||||
def {{nickname}}(self, {{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}**kwargs):
|
||||
"""
|
||||
|
||||
@@ -67,7 +67,7 @@ class ApiClient(object):
|
||||
if self.cookie:
|
||||
header_params['Cookie'] = self.cookie
|
||||
if header_params:
|
||||
header_params = ApiClient.sanitize_for_serialization(header_params)
|
||||
header_params = self.sanitize_for_serialization(header_params)
|
||||
|
||||
# path parameters
|
||||
if path_params:
|
||||
@@ -301,6 +301,3 @@ class ApiClient(object):
|
||||
querys[auth_setting['key']] = auth_setting['value']
|
||||
else:
|
||||
raise ValueError('Authentication token must be in `query` or `header`')
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
import base64
|
||||
import urllib3
|
||||
|
||||
|
||||
def get_api_key_with_prefix(key):
|
||||
global api_key
|
||||
global api_key_prefix
|
||||
@@ -35,11 +35,12 @@ def auth_settings():
|
||||
{{/isBasic}}{{/authMethods}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Default Base url
|
||||
host = "{{basePath}}"
|
||||
|
||||
# Default api client
|
||||
api_client = None
|
||||
|
||||
# Authentication settings
|
||||
|
||||
api_key = {}
|
||||
|
||||
Reference in New Issue
Block a user