-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
feat(python): expose all config properties in constructor #23020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,8 +51,23 @@ class Configuration: | |
| string values to replace variables in templated server configuration. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Constructor no longer accepts documented configuration parameters and now hard-codes defaults, so passing documented kwargs (e.g., retries, proxy, formats) raises TypeError and prevents configuration at construction. Prompt for AI agents |
||
| The validation of enums is performed for variables with defined enum | ||
| values before. | ||
| :param verify_ssl: bool - Set this to false to skip verifying SSL certificate | ||
| when calling API from https server. | ||
| :param ssl_ca_cert: str - the path to a file of concatenated CA certificates | ||
| in PEM format. | ||
| :param retries: Retry configuration (e.g. urllib3.util.retry.Retry). | ||
| :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 assert_hostname: Set this to True/False to enable/disable SSL hostname verification. | ||
| :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. | ||
| :param connection_pool_maxsize: Connection pool max size. Defaults to 100 for asyncio, cpu_count * 5 for sync. | ||
| :param proxy: Proxy URL. | ||
| :param proxy_headers: Proxy headers. | ||
| :param safe_chars_for_path_param: Safe characters for path parameter encoding. | ||
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
||
|
|
@@ -81,7 +96,7 @@ def __init__(self, host=None, | |
| access_token=None, | ||
| server_index=None, server_variables=None, | ||
| server_operation_index=None, server_operation_variables=None, | ||
| ssl_ca_cert=None, | ||
| ssl_ca_cert=None, verify_ssl=True, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Swapping Prompt for AI agents |
||
| ) -> None: | ||
| """Constructor | ||
| """ | ||
|
|
@@ -143,7 +158,7 @@ def __init__(self, host=None, | |
| """Debug switch | ||
| """ | ||
|
|
||
| self.verify_ssl = True | ||
| self.verify_ssl = verify_ssl | ||
| """SSL/TLS verification | ||
| Set this to false to skip verifying SSL certificate when calling API | ||
| from https server. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Constructor no longer accepts documented configuration parameters and hard-codes their defaults, so callers cannot pass options like retries/cert_file/proxy and the docstring is misleading.
Prompt for AI agents