forked from loafle/openapi-generator-original
[BUG][Python] init access token for python client configuration (#7469)
* fix: init access token for python client configuration * fix: remove duplicate initializations for access_token
This commit is contained in:
@@ -163,6 +163,7 @@ conf = {{{packageName}}}.Configuration(
|
||||
|
||||
def __init__(self, host=None,
|
||||
api_key=None, api_key_prefix=None,
|
||||
access_token=None,
|
||||
username=None, password=None,
|
||||
discard_unknown_keys=False,
|
||||
disabled_client_side_validations="",
|
||||
@@ -190,6 +191,7 @@ conf = {{{packageName}}}.Configuration(
|
||||
"""Temp file folder for downloading files
|
||||
"""
|
||||
# Authentication Settings
|
||||
self.access_token = access_token
|
||||
self.api_key = {}
|
||||
if api_key:
|
||||
self.api_key = api_key
|
||||
@@ -218,18 +220,6 @@ conf = {{{packageName}}}.Configuration(
|
||||
"""The HTTP signing configuration
|
||||
"""
|
||||
{{/hasHttpSignatureMethods}}
|
||||
{{#hasOAuthMethods}}
|
||||
self.access_token = None
|
||||
"""access token for OAuth/Bearer
|
||||
"""
|
||||
{{/hasOAuthMethods}}
|
||||
{{^hasOAuthMethods}}
|
||||
{{#hasBearerMethods}}
|
||||
self.access_token = None
|
||||
"""access token for OAuth/Bearer
|
||||
"""
|
||||
{{/hasBearerMethods}}
|
||||
{{/hasOAuthMethods}}
|
||||
self.logger = {}
|
||||
"""Logging Settings
|
||||
"""
|
||||
|
||||
@@ -122,6 +122,7 @@ conf = petstore_api.Configuration(
|
||||
|
||||
def __init__(self, host=None,
|
||||
api_key=None, api_key_prefix=None,
|
||||
access_token=None,
|
||||
username=None, password=None,
|
||||
discard_unknown_keys=False,
|
||||
disabled_client_side_validations="",
|
||||
@@ -146,6 +147,7 @@ conf = petstore_api.Configuration(
|
||||
"""Temp file folder for downloading files
|
||||
"""
|
||||
# Authentication Settings
|
||||
self.access_token = access_token
|
||||
self.api_key = {}
|
||||
if api_key:
|
||||
self.api_key = api_key
|
||||
@@ -167,9 +169,6 @@ conf = petstore_api.Configuration(
|
||||
"""
|
||||
self.discard_unknown_keys = discard_unknown_keys
|
||||
self.disabled_client_side_validations = disabled_client_side_validations
|
||||
self.access_token = None
|
||||
"""access token for OAuth/Bearer
|
||||
"""
|
||||
self.logger = {}
|
||||
"""Logging Settings
|
||||
"""
|
||||
|
||||
@@ -123,6 +123,7 @@ conf = petstore_api.Configuration(
|
||||
|
||||
def __init__(self, host=None,
|
||||
api_key=None, api_key_prefix=None,
|
||||
access_token=None,
|
||||
username=None, password=None,
|
||||
discard_unknown_keys=False,
|
||||
disabled_client_side_validations="",
|
||||
@@ -147,6 +148,7 @@ conf = petstore_api.Configuration(
|
||||
"""Temp file folder for downloading files
|
||||
"""
|
||||
# Authentication Settings
|
||||
self.access_token = access_token
|
||||
self.api_key = {}
|
||||
if api_key:
|
||||
self.api_key = api_key
|
||||
@@ -168,9 +170,6 @@ conf = petstore_api.Configuration(
|
||||
"""
|
||||
self.discard_unknown_keys = discard_unknown_keys
|
||||
self.disabled_client_side_validations = disabled_client_side_validations
|
||||
self.access_token = None
|
||||
"""access token for OAuth/Bearer
|
||||
"""
|
||||
self.logger = {}
|
||||
"""Logging Settings
|
||||
"""
|
||||
|
||||
@@ -118,6 +118,7 @@ conf = petstore_api.Configuration(
|
||||
|
||||
def __init__(self, host=None,
|
||||
api_key=None, api_key_prefix=None,
|
||||
access_token=None,
|
||||
username=None, password=None,
|
||||
discard_unknown_keys=False,
|
||||
disabled_client_side_validations="",
|
||||
@@ -142,6 +143,7 @@ conf = petstore_api.Configuration(
|
||||
"""Temp file folder for downloading files
|
||||
"""
|
||||
# Authentication Settings
|
||||
self.access_token = access_token
|
||||
self.api_key = {}
|
||||
if api_key:
|
||||
self.api_key = api_key
|
||||
@@ -163,9 +165,6 @@ conf = petstore_api.Configuration(
|
||||
"""
|
||||
self.discard_unknown_keys = discard_unknown_keys
|
||||
self.disabled_client_side_validations = disabled_client_side_validations
|
||||
self.access_token = None
|
||||
"""access token for OAuth/Bearer
|
||||
"""
|
||||
self.logger = {}
|
||||
"""Logging Settings
|
||||
"""
|
||||
|
||||
@@ -159,6 +159,7 @@ conf = petstore_api.Configuration(
|
||||
|
||||
def __init__(self, host=None,
|
||||
api_key=None, api_key_prefix=None,
|
||||
access_token=None,
|
||||
username=None, password=None,
|
||||
discard_unknown_keys=False,
|
||||
disabled_client_side_validations="",
|
||||
@@ -184,6 +185,7 @@ conf = petstore_api.Configuration(
|
||||
"""Temp file folder for downloading files
|
||||
"""
|
||||
# Authentication Settings
|
||||
self.access_token = access_token
|
||||
self.api_key = {}
|
||||
if api_key:
|
||||
self.api_key = api_key
|
||||
@@ -210,9 +212,6 @@ conf = petstore_api.Configuration(
|
||||
self.signing_info = signing_info
|
||||
"""The HTTP signing configuration
|
||||
"""
|
||||
self.access_token = None
|
||||
"""access token for OAuth/Bearer
|
||||
"""
|
||||
self.logger = {}
|
||||
"""Logging Settings
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user