diff --git a/api_client_generation/generate.sh b/api_client_generation/generate.sh index e272bd63..6a8aa46a 100755 --- a/api_client_generation/generate.sh +++ b/api_client_generation/generate.sh @@ -45,6 +45,10 @@ generate_files() { rm __init__.py # we don't care about __init__.py files cp *.py $project_root/symphony/bdk/gen/${name}_model + # update rest.py + cd $code_gen_dir/output/symphony/bdk/gen + cp rest.py $project_root/symphony/bdk/gen/rest.py + # remove downloaded files cd $code_gen_dir rm -r output @@ -53,6 +57,7 @@ generate_files() { then rm $support_file_name fi + } generate_files agent ${api_spec_base_url}/agent/agent-api-public-deprecated.yaml diff --git a/api_client_generation/openapi-generator-cli.jar b/api_client_generation/openapi-generator-cli.jar index cf0e72b4..a40227ba 100644 Binary files a/api_client_generation/openapi-generator-cli.jar and b/api_client_generation/openapi-generator-cli.jar differ diff --git a/symphony/bdk/gen/rest.py b/symphony/bdk/gen/rest.py index 8c09d436..448c863c 100644 --- a/symphony/bdk/gen/rest.py +++ b/symphony/bdk/gen/rest.py @@ -47,7 +47,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): if maxsize is None: maxsize = configuration.connection_pool_maxsize - ssl_context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH, cafile=configuration.ssl_ca_cert) + ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=configuration.ssl_ca_cert) ssl_context.load_default_certs() ssl_context.verify_mode = ssl.CERT_REQUIRED @@ -140,7 +140,7 @@ async def request(self, method, url, query_params=None, headers=None, # must del headers['Content-Type'], or the correct # Content-Type which generated by aiohttp del headers['Content-Type'] - data = aiohttp.FormData() + data = aiohttp.FormData(quote_fields=False) for param in post_params: k, v = param if isinstance(v, tuple) and len(v) == 3: