Skip to content

Commit bb0ead0

Browse files
committed
address suggestions
1 parent b536ae8 commit bb0ead0

11 files changed

Lines changed: 26 additions & 41 deletions

File tree

modules/openapi-generator/src/main/resources/python-pydantic-v1/configuration.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ conf = {{{packageName}}}.Configuration(
161161
{{/hasHttpSignatureMethods}}
162162
server_index=None, server_variables=None,
163163
server_operation_index=None, server_operation_variables=None,
164-
verify_ssl=True, ssl_ca_cert=None,
164+
ssl_ca_cert=None, verify_ssl=True,
165165
) -> None:
166166
"""Constructor
167167
"""

modules/openapi-generator/src/main/resources/python/configuration.mustache

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class Configuration:
199199
:param key_file: the path to a client key file, for mTLS.
200200
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
201201
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
202-
:param connection_pool_maxsize: Connection pool max size. Defaults to 100 for async, cpu_count * 5 for sync.
202+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
203203
:param proxy: Proxy URL.
204204
:param proxy_headers: Proxy headers.
205205
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
@@ -311,12 +311,12 @@ conf = {{{packageName}}}.Configuration(
311311
server_operation_index: Optional[Dict[int, int]]=None,
312312
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
313313
ignore_operation_servers: bool=False,
314-
verify_ssl: bool=True,
315314
ssl_ca_cert: Optional[str]=None,
316315
retries: Optional[Union[int, Any]] = None,
317316
ca_cert_data: Optional[Union[str, bytes]] = None,
318317
cert_file: Optional[str]=None,
319318
key_file: Optional[str]=None,
319+
verify_ssl: bool=True,
320320
assert_hostname: Optional[bool]=None,
321321
tls_server_name: Optional[str]=None,
322322
connection_pool_maxsize: Optional[int]=None,
@@ -434,16 +434,13 @@ conf = {{{packageName}}}.Configuration(
434434
{{#async}}
435435
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else 100
436436
"""This value is passed to the aiohttp to limit simultaneous connections.
437-
Default values is 100, None means no-limit.
437+
None in the constructor is coerced to default 100.
438438
"""
439439
{{/async}}
440440
{{^async}}
441441
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5
442442
"""urllib3 connection pool's maximum number of connections saved
443-
per pool. urllib3 uses 1 connection as default value, but this is
444-
not the best value when you are making a lot of possibly parallel
445-
requests to the same host, which is often the case here.
446-
cpu_count * 5 is used as default value to increase performance.
443+
per pool. None in the constructor is coerced to cpu_count * 5.
447444
"""
448445
{{/async}}
449446

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/configuration.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class Configuration:
169169
:param key_file: the path to a client key file, for mTLS.
170170
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
171171
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
172-
:param connection_pool_maxsize: Connection pool max size. Defaults to 100 for async, cpu_count * 5 for sync.
172+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
173173
:param proxy: Proxy URL.
174174
:param proxy_headers: Proxy headers.
175175
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
@@ -212,12 +212,12 @@ def __init__(
212212
server_operation_index: Optional[Dict[int, int]]=None,
213213
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
214214
ignore_operation_servers: bool=False,
215-
verify_ssl: bool=True,
216215
ssl_ca_cert: Optional[str]=None,
217216
retries: Optional[Union[int, Any]] = None,
218217
ca_cert_data: Optional[Union[str, bytes]] = None,
219218
cert_file: Optional[str]=None,
220219
key_file: Optional[str]=None,
220+
verify_ssl: bool=True,
221221
assert_hostname: Optional[bool]=None,
222222
tls_server_name: Optional[str]=None,
223223
connection_pool_maxsize: Optional[int]=None,
@@ -325,10 +325,7 @@ def __init__(
325325

326326
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5
327327
"""urllib3 connection pool's maximum number of connections saved
328-
per pool. urllib3 uses 1 connection as default value, but this is
329-
not the best value when you are making a lot of possibly parallel
330-
requests to the same host, which is often the case here.
331-
cpu_count * 5 is used as default value to increase performance.
328+
per pool. None in the constructor is coerced to cpu_count * 5.
332329
"""
333330

334331
self.proxy = proxy

samples/client/echo_api/python-pydantic-v1/openapi_client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def __init__(self, host=None,
9696
access_token=None,
9797
server_index=None, server_variables=None,
9898
server_operation_index=None, server_operation_variables=None,
99-
verify_ssl=True, ssl_ca_cert=None,
99+
ssl_ca_cert=None, verify_ssl=True,
100100
) -> None:
101101
"""Constructor
102102
"""

samples/client/echo_api/python/openapi_client/configuration.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class Configuration:
169169
:param key_file: the path to a client key file, for mTLS.
170170
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
171171
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
172-
:param connection_pool_maxsize: Connection pool max size. Defaults to 100 for async, cpu_count * 5 for sync.
172+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
173173
:param proxy: Proxy URL.
174174
:param proxy_headers: Proxy headers.
175175
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
@@ -212,12 +212,12 @@ def __init__(
212212
server_operation_index: Optional[Dict[int, int]]=None,
213213
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
214214
ignore_operation_servers: bool=False,
215-
verify_ssl: bool=True,
216215
ssl_ca_cert: Optional[str]=None,
217216
retries: Optional[Union[int, Any]] = None,
218217
ca_cert_data: Optional[Union[str, bytes]] = None,
219218
cert_file: Optional[str]=None,
220219
key_file: Optional[str]=None,
220+
verify_ssl: bool=True,
221221
assert_hostname: Optional[bool]=None,
222222
tls_server_name: Optional[str]=None,
223223
connection_pool_maxsize: Optional[int]=None,
@@ -325,10 +325,7 @@ def __init__(
325325

326326
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5
327327
"""urllib3 connection pool's maximum number of connections saved
328-
per pool. urllib3 uses 1 connection as default value, but this is
329-
not the best value when you are making a lot of possibly parallel
330-
requests to the same host, which is often the case here.
331-
cpu_count * 5 is used as default value to increase performance.
328+
per pool. None in the constructor is coerced to cpu_count * 5.
332329
"""
333330

334331
self.proxy = proxy

samples/openapi3/client/petstore/python-aiohttp/petstore_api/configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class Configuration:
174174
:param key_file: the path to a client key file, for mTLS.
175175
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
176176
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
177-
:param connection_pool_maxsize: Connection pool max size. Defaults to 100 for async, cpu_count * 5 for sync.
177+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
178178
:param proxy: Proxy URL.
179179
:param proxy_headers: Proxy headers.
180180
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
@@ -276,12 +276,12 @@ def __init__(
276276
server_operation_index: Optional[Dict[int, int]]=None,
277277
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
278278
ignore_operation_servers: bool=False,
279-
verify_ssl: bool=True,
280279
ssl_ca_cert: Optional[str]=None,
281280
retries: Optional[Union[int, Any]] = None,
282281
ca_cert_data: Optional[Union[str, bytes]] = None,
283282
cert_file: Optional[str]=None,
284283
key_file: Optional[str]=None,
284+
verify_ssl: bool=True,
285285
assert_hostname: Optional[bool]=None,
286286
tls_server_name: Optional[str]=None,
287287
connection_pool_maxsize: Optional[int]=None,
@@ -393,7 +393,7 @@ def __init__(
393393

394394
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else 100
395395
"""This value is passed to the aiohttp to limit simultaneous connections.
396-
Default values is 100, None means no-limit.
396+
None in the constructor is coerced to default 100.
397397
"""
398398

399399
self.proxy = proxy

samples/openapi3/client/petstore/python-httpx/petstore_api/configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class Configuration:
174174
:param key_file: the path to a client key file, for mTLS.
175175
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
176176
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
177-
:param connection_pool_maxsize: Connection pool max size. Defaults to 100 for async, cpu_count * 5 for sync.
177+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
178178
:param proxy: Proxy URL.
179179
:param proxy_headers: Proxy headers.
180180
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
@@ -276,12 +276,12 @@ def __init__(
276276
server_operation_index: Optional[Dict[int, int]]=None,
277277
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
278278
ignore_operation_servers: bool=False,
279-
verify_ssl: bool=True,
280279
ssl_ca_cert: Optional[str]=None,
281280
retries: Optional[Union[int, Any]] = None,
282281
ca_cert_data: Optional[Union[str, bytes]] = None,
283282
cert_file: Optional[str]=None,
284283
key_file: Optional[str]=None,
284+
verify_ssl: bool=True,
285285
assert_hostname: Optional[bool]=None,
286286
tls_server_name: Optional[str]=None,
287287
connection_pool_maxsize: Optional[int]=None,
@@ -393,7 +393,7 @@ def __init__(
393393

394394
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else 100
395395
"""This value is passed to the aiohttp to limit simultaneous connections.
396-
Default values is 100, None means no-limit.
396+
None in the constructor is coerced to default 100.
397397
"""
398398

399399
self.proxy = proxy

samples/openapi3/client/petstore/python-lazyImports/petstore_api/configuration.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class Configuration:
175175
:param key_file: the path to a client key file, for mTLS.
176176
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
177177
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
178-
:param connection_pool_maxsize: Connection pool max size. Defaults to 100 for async, cpu_count * 5 for sync.
178+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
179179
:param proxy: Proxy URL.
180180
:param proxy_headers: Proxy headers.
181181
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
@@ -277,12 +277,12 @@ def __init__(
277277
server_operation_index: Optional[Dict[int, int]]=None,
278278
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
279279
ignore_operation_servers: bool=False,
280-
verify_ssl: bool=True,
281280
ssl_ca_cert: Optional[str]=None,
282281
retries: Optional[Union[int, Any]] = None,
283282
ca_cert_data: Optional[Union[str, bytes]] = None,
284283
cert_file: Optional[str]=None,
285284
key_file: Optional[str]=None,
285+
verify_ssl: bool=True,
286286
assert_hostname: Optional[bool]=None,
287287
tls_server_name: Optional[str]=None,
288288
connection_pool_maxsize: Optional[int]=None,
@@ -395,10 +395,7 @@ def __init__(
395395

396396
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5
397397
"""urllib3 connection pool's maximum number of connections saved
398-
per pool. urllib3 uses 1 connection as default value, but this is
399-
not the best value when you are making a lot of possibly parallel
400-
requests to the same host, which is often the case here.
401-
cpu_count * 5 is used as default value to increase performance.
398+
per pool. None in the constructor is coerced to cpu_count * 5.
402399
"""
403400

404401
self.proxy = proxy

samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def __init__(self, host=None,
155155
signing_info=None,
156156
server_index=None, server_variables=None,
157157
server_operation_index=None, server_operation_variables=None,
158-
verify_ssl=True, ssl_ca_cert=None,
158+
ssl_ca_cert=None, verify_ssl=True,
159159
) -> None:
160160
"""Constructor
161161
"""

samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def __init__(self, host=None,
156156
signing_info=None,
157157
server_index=None, server_variables=None,
158158
server_operation_index=None, server_operation_variables=None,
159-
verify_ssl=True, ssl_ca_cert=None,
159+
ssl_ca_cert=None, verify_ssl=True,
160160
) -> None:
161161
"""Constructor
162162
"""

0 commit comments

Comments
 (0)