Skip to content

Commit b6d4321

Browse files
Merge pull request #18 from mxenabled/openapi-generator-0.5.0
Generated version 0.5.0
2 parents b767b15 + 99329f6 commit b6d4321

9 files changed

Lines changed: 643 additions & 14 deletions

File tree

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.1
1+
5.4.0

mx_platform_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212

13-
__version__ = "0.4.5"
13+
__version__ = "0.5.0"
1414

1515
# import ApiClient
1616
from mx_platform_python.api_client import ApiClient

mx_platform_python/api/mx_platform_api.py

Lines changed: 623 additions & 0 deletions
Large diffs are not rendered by default.

mx_platform_python/api_client.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7676
self.default_headers[header_name] = header_value
7777
self.cookie = cookie
7878
# Set default User-Agent.
79-
self.user_agent = 'OpenAPI-Generator/0.4.5/python'
79+
self.user_agent = 'OpenAPI-Generator/0.5.0/python'
8080

8181
def __enter__(self):
8282
return self
@@ -673,7 +673,8 @@ def __init__(self, settings=None, params_map=None, root_map=None,
673673
'_return_http_data_only',
674674
'_check_input_type',
675675
'_check_return_type',
676-
'_content_type'
676+
'_content_type',
677+
'_spec_property_naming'
677678
])
678679
self.params_map['nullable'].extend(['_request_timeout'])
679680
self.validations = root_map['validations']
@@ -687,6 +688,7 @@ def __init__(self, settings=None, params_map=None, root_map=None,
687688
'_return_http_data_only': (bool,),
688689
'_check_input_type': (bool,),
689690
'_check_return_type': (bool,),
691+
'_spec_property_naming': (bool,),
690692
'_content_type': (none_type, str)
691693
}
692694
self.openapi_types.update(extra_types)
@@ -723,7 +725,7 @@ def __validate_inputs(self, kwargs):
723725
value,
724726
self.openapi_types[key],
725727
[key],
726-
False,
728+
kwargs['_spec_property_naming'],
727729
kwargs['_check_input_type'],
728730
configuration=self.api_client.configuration
729731
)
@@ -751,11 +753,11 @@ def __gather_params(self, kwargs):
751753
base_name = self.attribute_map[param_name]
752754
if (param_location == 'form' and
753755
self.openapi_types[param_name] == (file_type,)):
754-
params['file'][param_name] = [param_value]
756+
params['file'][base_name] = [param_value]
755757
elif (param_location == 'form' and
756758
self.openapi_types[param_name] == ([file_type],)):
757759
# param_value is already a list
758-
params['file'][param_name] = param_value
760+
params['file'][base_name] = param_value
759761
elif param_location in {'form', 'query'}:
760762
param_value_full = (base_name, param_value)
761763
params[param_location].append(param_value_full)

mx_platform_python/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def to_debug_report(self):
404404
"OS: {env}\n"\
405405
"Python Version: {pyversion}\n"\
406406
"Version of the API: 0.1.0\n"\
407-
"SDK Package Version: 0.4.5".\
407+
"SDK Package Version: 0.5.0".\
408408
format(env=sys.platform, pyversion=sys.version)
409409

410410
def get_host_settings(self):

mx_platform_python/model_utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,7 @@ def model_to_dict(model_instance, serialize=True):
16571657
attribute_map
16581658
"""
16591659
result = {}
1660+
extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item
16601661

16611662
model_instances = [model_instance]
16621663
if model_instance._composed_schemas:
@@ -1686,14 +1687,17 @@ def model_to_dict(model_instance, serialize=True):
16861687
res.append(v)
16871688
elif isinstance(v, ModelSimple):
16881689
res.append(v.value)
1690+
elif isinstance(v, dict):
1691+
res.append(dict(map(
1692+
extract_item,
1693+
v.items()
1694+
)))
16891695
else:
16901696
res.append(model_to_dict(v, serialize=serialize))
16911697
result[attr] = res
16921698
elif isinstance(value, dict):
16931699
result[attr] = dict(map(
1694-
lambda item: (item[0],
1695-
model_to_dict(item[1], serialize=serialize))
1696-
if hasattr(item[1], '_data_store') else item,
1700+
extract_item,
16971701
value.items()
16981702
))
16991703
elif isinstance(value, ModelSimple):

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
packageName: mx_platform_python
33
packageUrl: https://pypi.org/project/mx-platform-python
4-
packageVersion: 0.4.5
4+
packageVersion: 0.5.0
55
projectName: mx-platform-python

openapitools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
33
"spaces": 2,
44
"generator-cli": {
5-
"version": "5.3.1"
5+
"version": "5.4.0"
66
}
77
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from setuptools import setup, find_packages # noqa: H301
1212

1313
NAME = "mx-platform-python"
14-
VERSION = "0.4.5"
14+
VERSION = "0.5.0"
1515
# To install the library, run the following
1616
#
1717
# python setup.py install

0 commit comments

Comments
 (0)