mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-10 19:49:05 +00:00
feat(python): enhance retry configuration in REST client (#22867)
* feat(python): enhance retry configuration in REST client Updated the retry parameter in the Configuration class to support different types based on the library used (urllib3 or asyncio). Adjusted the RESTClientObject to handle the new retry configuration, allowing for more flexible retry options. This change improves the handling of retries in API requests, ensuring compatibility with various retry strategies. * add samples * use async context for retry doc string
This commit is contained in:
@@ -162,7 +162,7 @@ class Configuration:
|
||||
values before.
|
||||
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
||||
in PEM format.
|
||||
:param retries: Number of retries for API requests.
|
||||
:param retries: int | urllib3.util.retry.Retry - Retry 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.
|
||||
@@ -203,7 +203,7 @@ conf = openapi_client.Configuration(
|
||||
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
||||
ignore_operation_servers: bool=False,
|
||||
ssl_ca_cert: Optional[str]=None,
|
||||
retries: Optional[int] = None,
|
||||
retries: Optional[Union[int, Any]] = None,
|
||||
ca_cert_data: Optional[Union[str, bytes]] = None,
|
||||
cert_file: Optional[str]=None,
|
||||
key_file: Optional[str]=None,
|
||||
@@ -320,7 +320,7 @@ conf = openapi_client.Configuration(
|
||||
"""Safe chars for path_param
|
||||
"""
|
||||
self.retries = retries
|
||||
"""Adding retries to override urllib3 default value 3
|
||||
"""Retry configuration
|
||||
"""
|
||||
# Enable client side validation
|
||||
self.client_side_validation = True
|
||||
|
||||
Reference in New Issue
Block a user