fix: use httpx in generated configuration.py (#22418)

* fix: use httpx in generated configuration.py

* fix: add enum_values for httpx

* chore: update petstore samples
This commit is contained in:
Josh Wulf
2025-11-23 20:11:48 +13:00
committed by GitHub
parent c5e0d0840b
commit ddfcc95b61
7 changed files with 48 additions and 17 deletions

View File

@@ -166,7 +166,7 @@ class Configuration:
:param ca_cert_data: verify the peer using concatenated CA certificate data
in PEM (str) or DER (bytes) format.
:param cert_file: the path to a client certificate file, for mTLS.
:param key_file: the path to a client key file, for mTLS.
:param key_file: the path to a client key file, for mTLS.
:Example:
@@ -504,6 +504,7 @@ conf = openapi_client.Configuration(
password = ""
if self.password is not None:
password = self.password
return urllib3.util.make_headers(
basic_auth=username + ':' + password
).get('authorization')
@@ -587,6 +588,7 @@ conf = openapi_client.Configuration(
variable_name, variable['default_value'])
if 'enum_values' in variable \
and variable['enum_values'] \
and used_value not in variable['enum_values']:
raise ValueError(
"The variable `{0}` in the host URL has invalid value "