mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 19:17:11 +00:00
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:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user