Skip to content

Commit 64b691b

Browse files
committed
Regenerate of examples
1 parent ff32fa0 commit 64b691b

15 files changed

Lines changed: 206 additions & 12 deletions

File tree

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/configuration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ class Configuration:
165165
:param retries: Number of retries for API requests.
166166
:param ca_cert_data: verify the peer using concatenated CA certificate data
167167
in PEM (str) or DER (bytes) format.
168+
:param cert_file: the path to a client certificate file, for mTLS.
169+
:param key_file: the path to a client key file, for mTLS.
168170
169171
:Example:
170172
@@ -203,6 +205,8 @@ def __init__(
203205
ssl_ca_cert: Optional[str]=None,
204206
retries: Optional[int] = None,
205207
ca_cert_data: Optional[Union[str, bytes]] = None,
208+
cert_file: Optional[str]=None,
209+
key_file: Optional[str]=None,
206210
*,
207211
debug: Optional[bool] = None,
208212
) -> None:
@@ -284,10 +288,10 @@ def __init__(
284288
"""Set this to verify the peer using PEM (str) or DER (bytes)
285289
certificate data.
286290
"""
287-
self.cert_file = None
291+
self.cert_file = cert_file
288292
"""client certificate file
289293
"""
290-
self.key_file = None
294+
self.key_file = key_file
291295
"""client key file
292296
"""
293297
self.assert_hostname = None

samples/client/echo_api/python/openapi_client/configuration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ class Configuration:
165165
:param retries: Number of retries for API requests.
166166
:param ca_cert_data: verify the peer using concatenated CA certificate data
167167
in PEM (str) or DER (bytes) format.
168+
:param cert_file: the path to a client certificate file, for mTLS.
169+
:param key_file: the path to a client key file, for mTLS.
168170
169171
:Example:
170172
@@ -203,6 +205,8 @@ def __init__(
203205
ssl_ca_cert: Optional[str]=None,
204206
retries: Optional[int] = None,
205207
ca_cert_data: Optional[Union[str, bytes]] = None,
208+
cert_file: Optional[str]=None,
209+
key_file: Optional[str]=None,
206210
*,
207211
debug: Optional[bool] = None,
208212
) -> None:
@@ -284,10 +288,10 @@ def __init__(
284288
"""Set this to verify the peer using PEM (str) or DER (bytes)
285289
certificate data.
286290
"""
287-
self.cert_file = None
291+
self.cert_file = cert_file
288292
"""client certificate file
289293
"""
290-
self.key_file = None
294+
self.key_file = key_file
291295
"""client key file
292296
"""
293297
self.assert_hostname = None

samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ protected function createHttpClientOption()
408408
}
409409
}
410410

411+
if ($this->config->getCertFile()) {
412+
$options[RequestOptions::CERT] = $this->config->getCertFile();
413+
}
414+
415+
if ($this->config->getKeyFile()) {
416+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
417+
}
418+
411419
return $options;
412420
}
413421

samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,14 @@ protected function createHttpClientOption()
381381
}
382382
}
383383

384+
if ($this->config->getCertFile()) {
385+
$options[RequestOptions::CERT] = $this->config->getCertFile();
386+
}
387+
388+
if ($this->config->getKeyFile()) {
389+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
390+
}
391+
384392
return $options;
385393
}
386394

samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7578,6 +7578,14 @@ protected function createHttpClientOption()
75787578
}
75797579
}
75807580

7581+
if ($this->config->getCertFile()) {
7582+
$options[RequestOptions::CERT] = $this->config->getCertFile();
7583+
}
7584+
7585+
if ($this->config->getKeyFile()) {
7586+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
7587+
}
7588+
75817589
return $options;
75827590
}
75837591

samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,14 @@ protected function createHttpClientOption()
413413
}
414414
}
415415

416+
if ($this->config->getCertFile()) {
417+
$options[RequestOptions::CERT] = $this->config->getCertFile();
418+
}
419+
420+
if ($this->config->getKeyFile()) {
421+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
422+
}
423+
416424
return $options;
417425
}
418426

samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,6 +3450,14 @@ protected function createHttpClientOption()
34503450
}
34513451
}
34523452

3453+
if ($this->config->getCertFile()) {
3454+
$options[RequestOptions::CERT] = $this->config->getCertFile();
3455+
}
3456+
3457+
if ($this->config->getKeyFile()) {
3458+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
3459+
}
3460+
34533461
return $options;
34543462
}
34553463

samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,14 @@ protected function createHttpClientOption()
11621162
}
11631163
}
11641164

1165+
if ($this->config->getCertFile()) {
1166+
$options[RequestOptions::CERT] = $this->config->getCertFile();
1167+
}
1168+
1169+
if ($this->config->getKeyFile()) {
1170+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
1171+
}
1172+
11651173
return $options;
11661174
}
11671175

samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,6 +2024,14 @@ protected function createHttpClientOption()
20242024
}
20252025
}
20262026

2027+
if ($this->config->getCertFile()) {
2028+
$options[RequestOptions::CERT] = $this->config->getCertFile();
2029+
}
2030+
2031+
if ($this->config->getKeyFile()) {
2032+
$options[RequestOptions::SSL_KEY] = $this->config->getKeyFile();
2033+
}
2034+
20272035
return $options;
20282036
}
20292037

samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,20 @@ class Configuration
123123
*/
124124
protected $tempFolderPath;
125125

126+
/**
127+
* Path to a certificate file, for mTLS
128+
*
129+
* @var string
130+
*/
131+
protected $certFile;
132+
133+
/**
134+
* Path to a key file, for mTLS
135+
*
136+
* @var string
137+
*/
138+
protected $keyFile;
139+
126140
/**
127141
* Constructor
128142
*/
@@ -396,6 +410,49 @@ public function getTempFolderPath()
396410
return $this->tempFolderPath;
397411
}
398412

413+
/**
414+
* Sets the certificate file path, for mTLS
415+
*
416+
* @return $this
417+
*/
418+
public function setCertFile($certFile)
419+
{
420+
$this->certFile = $certFile;
421+
return $this;
422+
}
423+
424+
/**
425+
* Gets the certificate file path, for mTLS
426+
*
427+
* @return string Certificate file path
428+
*/
429+
public function getCertFile()
430+
{
431+
return $this->certFile;
432+
}
433+
434+
/**
435+
* Sets the certificate key path, for mTLS
436+
*
437+
* @return $this
438+
*/
439+
public function setKeyFile($keyFile)
440+
{
441+
$this->keyFile = $keyFile;
442+
return $this;
443+
}
444+
445+
/**
446+
* Gets the certificate key path, for mTLS
447+
*
448+
* @return string Certificate key path
449+
*/
450+
public function getKeyFile()
451+
{
452+
return $this->keyFile;
453+
}
454+
455+
399456
/**
400457
* Gets the default configuration instance
401458
*

0 commit comments

Comments
 (0)