Skip to content

Commit 156b255

Browse files
committed
Expose mtls config params in python template
1 parent 91a499b commit 156b255

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

modules/openapi-generator/src/main/resources/python/configuration.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ class Configuration:
186186
:param retries: Number of retries for API requests.
187187
:param ca_cert_data: verify the peer using concatenated CA certificate data
188188
in PEM (str) or DER (bytes) format.
189+
:param cert_file: the path to a client certificate file, for mTLS.
190+
:param key_file: the path to a client key file, for mTLS.
189191

190192
{{#hasAuthMethods}}
191193
:Example:
@@ -293,6 +295,8 @@ conf = {{{packageName}}}.Configuration(
293295
ssl_ca_cert: Optional[str]=None,
294296
retries: Optional[int] = None,
295297
ca_cert_data: Optional[Union[str, bytes]] = None,
298+
cert_file: Optional[str]=None,
299+
key_file: Optional[str]=None,
296300
*,
297301
debug: Optional[bool] = None,
298302
) -> None:
@@ -381,10 +385,10 @@ conf = {{{packageName}}}.Configuration(
381385
"""Set this to verify the peer using PEM (str) or DER (bytes)
382386
certificate data.
383387
"""
384-
self.cert_file = None
388+
self.cert_file = cert_file
385389
"""client certificate file
386390
"""
387-
self.key_file = None
391+
self.key_file = key_file
388392
"""client key file
389393
"""
390394
self.assert_hostname = None

0 commit comments

Comments
 (0)