-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Description
Is your feature request related to a problem? Please describe.
add 'no_proxy' feature supporting in python client besides current 'proxy' and 'proxy_headers' features.
there is no 'no_proxy' feature in current python client as below:
openapi-generator/modules/openapi-generator/src/main/resources/python/configuration.mustache
Lines 278 to 283 in c165629
| self.proxy = None | |
| """Proxy URL | |
| """ | |
| self.proxy_headers = None | |
| """Proxy headers | |
| """ |
openapi-generator/modules/openapi-generator/src/main/resources/python/rest.mustache
Lines 67 to 69 in c165629
| if configuration.proxy: | |
| self.pool_manager = urllib3.ProxyManager( | |
| num_pools=pools_size, |
as the result, it needs to set/unset proxy parameter according to the destinations.
for example, kubernets(CNCF) provides its API in openapi definition. and CNCF official python client, using the code generated by openapi-generator, access to cloud servers as well as on-premise servers.
as the result, user needs to set/unset proxy parameter according to the destinations.
it is bothering task.
Describe the solution you'd like
add no_proxy parameter in configuration.py, then rest.py chooses either ProxyManager or PoolManager according to
the parameters(proxy and no_proxy).