Skip to content

Commit 838351a

Browse files
Release 1.4.2 (#11)
1 parent a21eb9e commit 838351a

9 files changed

+60
-14
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Python >=3.7
5050
Install using `pip`:
5151

5252
```shell
53-
python3 -m pip install dropbox-sign==1.4.1
53+
python3 -m pip install dropbox-sign==1.4.2
5454
```
5555

5656
Alternatively:
@@ -362,6 +362,6 @@ [email protected]
362362
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
363363

364364
- API version: 3.0.0
365-
- Package version: 1.4.1
365+
- Package version: 1.4.2
366366
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
367367

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.1
1+
1.4.2

dropbox_sign/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313

14-
__version__ = "1.4.1"
14+
__version__ = "1.4.2"
1515

1616
# import ApiClient
1717
from dropbox_sign.api_client import ApiClient

dropbox_sign/api_client.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/1.4.1/python'
80+
self.user_agent = 'OpenAPI-Generator/1.4.2/python'
8181

8282
def __enter__(self):
8383
return self
@@ -780,10 +780,12 @@ def __gather_params(self, kwargs):
780780

781781
if len(remove_files):
782782
for param in body:
783-
param_value_full = (param, json.dumps(body[param]))
783+
param_value_full = (param, body[param])
784+
784785
# do not change non-JSON values
785-
if not '{' in param_value_full[1] and not '[' in param_value_full[1]:
786-
param_value_full = (param, body[param])
786+
if (not isinstance(body[param], (str, bool, int, float))):
787+
param_value_full = (param, json.dumps(body[param]))
788+
787789
params['form'].append(param_value_full)
788790
else:
789791
params['body'] = param_value

dropbox_sign/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def to_debug_report(self):
413413
"OS: {env}\n"\
414414
"Python Version: {pyversion}\n"\
415415
"Version of the API: 3.0.0\n"\
416-
"SDK Package Version: 1.4.1".\
416+
"SDK Package Version: 1.4.2".\
417417
format(env=sys.platform, pyversion=sys.version)
418418

419419
def get_host_settings(self):

openapi-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ additionalProperties:
44
generatorLanguageVersion: ">=3.7"
55
packageName: dropbox_sign
66
projectName: dropbox-sign
7-
packageVersion: 1.4.1
7+
packageVersion: 1.4.2
88
sortModelPropertiesByRequiredFlag: true
99
legacyDiscriminatorBehavior: true
1010
packageAuthor: Dropbox Sign API Team

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from pathlib import Path
1414

1515
NAME = "dropbox-sign"
16-
VERSION = "1.4.1"
16+
VERSION = "1.4.2"
1717
# To install the library, run the following
1818
#
1919
# python setup.py install

templates/api_client.mustache

+5-3
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,12 @@ class Endpoint(object):
800800

801801
if len(remove_files):
802802
for param in body:
803-
param_value_full = (param, json.dumps(body[param]))
803+
param_value_full = (param, body[param])
804+
804805
# do not change non-JSON values
805-
if not '{' in param_value_full[1] and not '[' in param_value_full[1]:
806-
param_value_full = (param, body[param])
806+
if (not isinstance(body[param], (str, bool, int, float))):
807+
param_value_full = (param, json.dumps(body[param]))
808+
807809
params['form'].append(param_value_full)
808810
else:
809811
params['body'] = param_value

tests/test_signature_request_api.py

+42
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,48 @@ def test_init_allows_binary_file(self):
7373

7474
obj.files[0].close()
7575

76+
def test_init_allows_jsony_chars_in_strings(self):
77+
title = "테스트 - testing japanese characters in subject"
78+
subject = "[テスト]"
79+
message = "{\"テスト - testing message\"}"
80+
81+
request_data = {
82+
"test_mode": True,
83+
"title": title,
84+
"subject": subject,
85+
"message": message,
86+
"signers": [
87+
{
88+
"email_address": "[email protected]",
89+
"name": "Jill",
90+
"order": 1
91+
}
92+
],
93+
"files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")]
94+
}
95+
96+
obj = m.SignatureRequestSendRequest.init(request_data)
97+
98+
self.mock_pool.expect_request(
99+
content_type='multipart/form-data',
100+
data=request_data,
101+
response={}
102+
)
103+
104+
self.api.signature_request_send(obj)
105+
106+
fields = self.mock_pool.get_fields()
107+
108+
title_result = fields[1]
109+
subject_result = fields[2]
110+
message_result = fields[3]
111+
112+
self.assertEqual(title_result[1], title)
113+
self.assertEqual(subject_result[1], subject)
114+
self.assertEqual(message_result[1], message)
115+
116+
obj.files[0].close()
117+
76118
def test_signature_request_bulk_create_embedded_with_template(self):
77119
request_class = 'SignatureRequestBulkCreateEmbeddedWithTemplateRequest'
78120
request_data = get_fixture_data(request_class)['default']

0 commit comments

Comments
 (0)