set 'None' to body for request if given body is 'None' ( issue #3020 ) (#3021)

This commit is contained in:
Takuro Wada
2016-06-02 15:51:13 +09:00
committed by wing328
parent 23d2c56096
commit 91c35509b8
10 changed files with 180 additions and 16 deletions

View File

@@ -42,13 +42,63 @@ class AdditionalPropertiesClass(object):
and the value is json key in definition.
"""
self.swagger_types = {
'map_property': 'dict(str, str)',
'map_of_map_property': 'dict(str, dict(str, str))'
}
self.attribute_map = {
'map_property': 'map_property',
'map_of_map_property': 'map_of_map_property'
}
self._map_property = None
self._map_of_map_property = None
@property
def map_property(self):
"""
Gets the map_property of this AdditionalPropertiesClass.
:return: The map_property of this AdditionalPropertiesClass.
:rtype: dict(str, str)
"""
return self._map_property
@map_property.setter
def map_property(self, map_property):
"""
Sets the map_property of this AdditionalPropertiesClass.
:param map_property: The map_property of this AdditionalPropertiesClass.
:type: dict(str, str)
"""
self._map_property = map_property
@property
def map_of_map_property(self):
"""
Gets the map_of_map_property of this AdditionalPropertiesClass.
:return: The map_of_map_property of this AdditionalPropertiesClass.
:rtype: dict(str, dict(str, str))
"""
return self._map_of_map_property
@map_of_map_property.setter
def map_of_map_property(self, map_of_map_property):
"""
Sets the map_of_map_property of this AdditionalPropertiesClass.
:param map_of_map_property: The map_of_map_property of this AdditionalPropertiesClass.
:type: dict(str, dict(str, str))
"""
self._map_of_map_property = map_of_map_property
def to_dict(self):
"""

View File

@@ -42,13 +42,89 @@ class ArrayTest(object):
and the value is json key in definition.
"""
self.swagger_types = {
'array_of_string': 'list[str]',
'array_array_of_integer': 'list[list[int]]',
'array_array_of_model': 'list[list[ReadOnlyFirst]]'
}
self.attribute_map = {
'array_of_string': 'array_of_string',
'array_array_of_integer': 'array_array_of_integer',
'array_array_of_model': 'array_array_of_model'
}
self._array_of_string = None
self._array_array_of_integer = None
self._array_array_of_model = None
@property
def array_of_string(self):
"""
Gets the array_of_string of this ArrayTest.
:return: The array_of_string of this ArrayTest.
:rtype: list[str]
"""
return self._array_of_string
@array_of_string.setter
def array_of_string(self, array_of_string):
"""
Sets the array_of_string of this ArrayTest.
:param array_of_string: The array_of_string of this ArrayTest.
:type: list[str]
"""
self._array_of_string = array_of_string
@property
def array_array_of_integer(self):
"""
Gets the array_array_of_integer of this ArrayTest.
:return: The array_array_of_integer of this ArrayTest.
:rtype: list[list[int]]
"""
return self._array_array_of_integer
@array_array_of_integer.setter
def array_array_of_integer(self, array_array_of_integer):
"""
Sets the array_array_of_integer of this ArrayTest.
:param array_array_of_integer: The array_array_of_integer of this ArrayTest.
:type: list[list[int]]
"""
self._array_array_of_integer = array_array_of_integer
@property
def array_array_of_model(self):
"""
Gets the array_array_of_model of this ArrayTest.
:return: The array_array_of_model of this ArrayTest.
:rtype: list[list[ReadOnlyFirst]]
"""
return self._array_array_of_model
@array_array_of_model.setter
def array_array_of_model(self, array_array_of_model):
"""
Sets the array_array_of_model of this ArrayTest.
:param array_array_of_model: The array_array_of_model of this ArrayTest.
:type: list[list[ReadOnlyFirst]]
"""
self._array_array_of_model = array_array_of_model
def to_dict(self):
"""

View File

@@ -43,16 +43,19 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
"""
self.swagger_types = {
'uuid': 'str',
'date_time': 'datetime'
'date_time': 'datetime',
'map': 'dict(str, Animal)'
}
self.attribute_map = {
'uuid': 'uuid',
'date_time': 'dateTime'
'date_time': 'dateTime',
'map': 'map'
}
self._uuid = None
self._date_time = None
self._map = None
@property
def uuid(self):
@@ -100,6 +103,29 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
self._date_time = date_time
@property
def map(self):
"""
Gets the map of this MixedPropertiesAndAdditionalPropertiesClass.
:return: The map of this MixedPropertiesAndAdditionalPropertiesClass.
:rtype: dict(str, Animal)
"""
return self._map
@map.setter
def map(self, map):
"""
Sets the map of this MixedPropertiesAndAdditionalPropertiesClass.
:param map: The map of this MixedPropertiesAndAdditionalPropertiesClass.
:type: dict(str, Animal)
"""
self._map = map
def to_dict(self):
"""
Returns the model properties as a dict