diff --git a/modules/swagger-codegen/src/main/resources/python/api_client.mustache b/modules/swagger-codegen/src/main/resources/python/api_client.mustache index 37bf1be69c0..16604bca18c 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_client.mustache @@ -45,13 +45,13 @@ class ApiClient(object): :param header_value: a header value to pass when making calls to the API """ def __init__(self, host=Configuration().host, - header_name=None, header_value=None): + header_name=None, header_value=None, cookie=None): self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.host = host - self.cookie = None + self.cookie = cookie # Set default User-Agent. self.user_agent = 'Python-Swagger' diff --git a/modules/swagger-codegen/src/main/resources/python3/swagger.mustache b/modules/swagger-codegen/src/main/resources/python3/swagger.mustache index f99f0d4d250..57f959c380b 100644 --- a/modules/swagger-codegen/src/main/resources/python3/swagger.mustache +++ b/modules/swagger-codegen/src/main/resources/python3/swagger.mustache @@ -18,13 +18,13 @@ from .models import * class ApiClient: """Generic API client for Swagger client library builds""" - def __init__(self, apiKey=None, apiServer=None): + def __init__(self, apiKey=None, apiServer=None, cookie=None): if apiKey == None: raise Exception('You must pass an apiKey when instantiating the ' 'APIClient') self.apiKey = apiKey self.apiServer = apiServer - self.cookie = None + self.cookie = cookie def callAPI(self, resourcePath, method, queryParams, postData, headerParams=None):