Python improved (#5512)

* ignore .vscode

* fixed test case for models requiring mandatory attributes. added deserialize test for enum class

* construct model with mandatory attributes. improve class reflection (e.g. deserialize). disable generated empty model unit test for further FIXME

* rebuilt samples

* FIXME comment

* FIXME comment

* fix deserialization enum test
This commit is contained in:
Cas Perl
2017-05-17 15:18:51 +02:00
committed by wing328
parent 5bfd723ecc
commit a6b7f60ac7
79 changed files with 917 additions and 1167 deletions

1
.gitignore vendored
View File

@@ -23,6 +23,7 @@ packages/
.pub .pub
.packages .packages
.vagrant/ .vagrant/
.vscode/
.settings .settings

View File

@@ -608,16 +608,17 @@ class ApiClient(object):
:param klass: class literal. :param klass: class literal.
:return: model object. :return: model object.
""" """
instance = klass() if not klass.swagger_types:
if not instance.swagger_types:
return data return data
for attr, attr_type in iteritems(instance.swagger_types): kwargs = {}
for attr, attr_type in iteritems(klass.swagger_types):
if data is not None \ if data is not None \
and instance.attribute_map[attr] in data \ and klass.attribute_map[attr] in data \
and isinstance(data, (list, dict)): and isinstance(data, (list, dict)):
value = data[instance.attribute_map[attr]] value = data[klass.attribute_map[attr]]
setattr(instance, attr, self.__deserialize(value, attr_type)) kwargs[attr] = self.__deserialize(value, attr_type)
instance = klass(**kwargs)
return instance return instance

View File

@@ -14,42 +14,50 @@ class {{classname}}(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
{{#allowableValues}}
{{#allowableValues}}
"""
allowed enum values
"""
{{#enumVars}} {{#enumVars}}
{{name}} = {{{value}}} {{name}} = {{{value}}}
{{/enumVars}} {{/enumVars}}
{{/allowableValues}} {{/allowableValues}}
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
{{#vars}}'{{name}}': '{{{datatype}}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
}
attribute_map = {
{{#vars}}'{{name}}': '{{baseName}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
}
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}):
""" """
{{classname}} - a model defined in Swagger {{classname}} - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
{{#vars}}'{{name}}': '{{{datatype}}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
}
self.attribute_map = {
{{#vars}}'{{name}}': '{{baseName}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
}
{{#vars}} {{#vars}}
self._{{name}} = None self._{{name}} = None
{{/vars}} {{/vars}}
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
{{#vars}} {{#vars}}
{{#required}}
self.{{name}} = {{name}}
{{/required}}
{{^required}}
if {{name}} is not None: if {{name}} is not None:
self.{{name}} = {{name}} self.{{name}} = {{name}}
{{/required}}
{{/vars}} {{/vars}}
{{#vars}} {{#vars}}

View File

@@ -28,7 +28,9 @@ class Test{{classname}}(unittest.TestCase):
""" """
Test {{classname}} Test {{classname}}
""" """
model = {{packageName}}.models.{{classFilename}}.{{classname}}() # FIXME: construct object with mandatory attributes with example values
#model = {{packageName}}.models.{{classFilename}}.{{classname}}()
pass
{{/model}} {{/model}}
{{/models}} {{/models}}

View File

@@ -617,16 +617,17 @@ class ApiClient(object):
:param klass: class literal. :param klass: class literal.
:return: model object. :return: model object.
""" """
instance = klass() if not klass.swagger_types:
if not instance.swagger_types:
return data return data
for attr, attr_type in iteritems(instance.swagger_types): kwargs = {}
for attr, attr_type in iteritems(klass.swagger_types):
if data is not None \ if data is not None \
and instance.attribute_map[attr] in data \ and klass.attribute_map[attr] in data \
and isinstance(data, (list, dict)): and isinstance(data, (list, dict)):
value = data[instance.attribute_map[attr]] value = data[klass.attribute_map[attr]]
setattr(instance, attr, self.__deserialize(value, attr_type)) kwargs[attr] = self.__deserialize(value, attr_type)
instance = klass(**kwargs)
return instance return instance

View File

@@ -21,31 +21,33 @@ class AdditionalPropertiesClass(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'map_property': 'dict(str, str)',
'map_of_map_property': 'dict(str, dict(str, str))'
}
attribute_map = {
'map_property': 'map_property',
'map_of_map_property': 'map_of_map_property'
}
def __init__(self, map_property=None, map_of_map_property=None): def __init__(self, map_property=None, map_of_map_property=None):
""" """
AdditionalPropertiesClass - a model defined in Swagger AdditionalPropertiesClass - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
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_property = None
self._map_of_map_property = None self._map_of_map_property = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if map_property is not None: if map_property is not None:
self.map_property = map_property self.map_property = map_property
if map_of_map_property is not None: if map_of_map_property is not None:

View File

@@ -21,33 +21,34 @@ class Animal(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'class_name': 'str',
'color': 'str'
}
attribute_map = {
'class_name': 'className',
'color': 'color'
}
def __init__(self, class_name=None, color='red'): def __init__(self, class_name=None, color='red'):
""" """
Animal - a model defined in Swagger Animal - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'class_name': 'str',
'color': 'str'
}
self.attribute_map = {
'class_name': 'className',
'color': 'color'
}
self._class_name = None self._class_name = None
self._color = None self._color = None
# TODO: let required properties as mandatory parameter in the constructor. self.class_name = class_name
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if class_name is not None:
self.class_name = class_name
if color is not None: if color is not None:
self.color = color self.color = color

View File

@@ -21,27 +21,29 @@ class AnimalFarm(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
}
attribute_map = {
}
def __init__(self): def __init__(self):
""" """
AnimalFarm - a model defined in Swagger AnimalFarm - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
}
self.attribute_map = {
}
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
def to_dict(self): def to_dict(self):
""" """

View File

@@ -21,34 +21,36 @@ class ApiResponse(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'code': 'int',
'type': 'str',
'message': 'str'
}
attribute_map = {
'code': 'code',
'type': 'type',
'message': 'message'
}
def __init__(self, code=None, type=None, message=None): def __init__(self, code=None, type=None, message=None):
""" """
ApiResponse - a model defined in Swagger ApiResponse - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'code': 'int',
'type': 'str',
'message': 'str'
}
self.attribute_map = {
'code': 'code',
'type': 'type',
'message': 'message'
}
self._code = None self._code = None
self._type = None self._type = None
self._message = None self._message = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if code is not None: if code is not None:
self.code = code self.code = code
if type is not None: if type is not None:

View File

@@ -21,28 +21,30 @@ class ArrayOfArrayOfNumberOnly(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'array_array_number': 'list[list[float]]'
}
attribute_map = {
'array_array_number': 'ArrayArrayNumber'
}
def __init__(self, array_array_number=None): def __init__(self, array_array_number=None):
""" """
ArrayOfArrayOfNumberOnly - a model defined in Swagger ArrayOfArrayOfNumberOnly - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'array_array_number': 'list[list[float]]'
}
self.attribute_map = {
'array_array_number': 'ArrayArrayNumber'
}
self._array_array_number = None self._array_array_number = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if array_array_number is not None: if array_array_number is not None:
self.array_array_number = array_array_number self.array_array_number = array_array_number

View File

@@ -21,28 +21,30 @@ class ArrayOfNumberOnly(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'array_number': 'list[float]'
}
attribute_map = {
'array_number': 'ArrayNumber'
}
def __init__(self, array_number=None): def __init__(self, array_number=None):
""" """
ArrayOfNumberOnly - a model defined in Swagger ArrayOfNumberOnly - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'array_number': 'list[float]'
}
self.attribute_map = {
'array_number': 'ArrayNumber'
}
self._array_number = None self._array_number = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if array_number is not None: if array_number is not None:
self.array_number = array_number self.array_number = array_number

View File

@@ -21,34 +21,36 @@ class ArrayTest(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'array_of_string': 'list[str]',
'array_array_of_integer': 'list[list[int]]',
'array_array_of_model': 'list[list[ReadOnlyFirst]]'
}
attribute_map = {
'array_of_string': 'array_of_string',
'array_array_of_integer': 'array_array_of_integer',
'array_array_of_model': 'array_array_of_model'
}
def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None):
""" """
ArrayTest - a model defined in Swagger ArrayTest - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
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_of_string = None
self._array_array_of_integer = None self._array_array_of_integer = None
self._array_array_of_model = None self._array_array_of_model = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if array_of_string is not None: if array_of_string is not None:
self.array_of_string = array_of_string self.array_of_string = array_of_string
if array_array_of_integer is not None: if array_array_of_integer is not None:

View File

@@ -21,32 +21,37 @@ class Capitalization(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'small_camel': 'str',
'capital_camel': 'str',
'small_snake': 'str',
'capital_snake': 'str',
'sca_eth_flow_points': 'str',
'att_name': 'str'
}
attribute_map = {
'small_camel': 'smallCamel',
'capital_camel': 'CapitalCamel',
'small_snake': 'small_Snake',
'capital_snake': 'Capital_Snake',
'sca_eth_flow_points': 'SCA_ETH_Flow_Points',
'att_name': 'ATT_NAME'
}
def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None):
""" """
Capitalization - a model defined in Swagger Capitalization - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'small_camel': 'str',
'capital_camel': 'str',
'small_snake': 'str',
'capital_snake': 'str',
'sca_eth_flow_points': 'str',
'att_name': 'str'
}
self.attribute_map = {
'small_camel': 'smallCamel',
'capital_camel': 'CapitalCamel',
'small_snake': 'small_Snake',
'capital_snake': 'Capital_Snake',
'sca_eth_flow_points': 'SCA_ETH_Flow_Points',
'att_name': 'ATT_NAME'
}
self._small_camel = None self._small_camel = None
self._capital_camel = None self._capital_camel = None
@@ -55,9 +60,6 @@ class Capitalization(object):
self._sca_eth_flow_points = None self._sca_eth_flow_points = None
self._att_name = None self._att_name = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if small_camel is not None: if small_camel is not None:
self.small_camel = small_camel self.small_camel = small_camel
if capital_camel is not None: if capital_camel is not None:

View File

@@ -21,36 +21,37 @@ class Cat(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'class_name': 'str',
'color': 'str',
'declawed': 'bool'
}
attribute_map = {
'class_name': 'className',
'color': 'color',
'declawed': 'declawed'
}
def __init__(self, class_name=None, color='red', declawed=None): def __init__(self, class_name=None, color='red', declawed=None):
""" """
Cat - a model defined in Swagger Cat - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'class_name': 'str',
'color': 'str',
'declawed': 'bool'
}
self.attribute_map = {
'class_name': 'className',
'color': 'color',
'declawed': 'declawed'
}
self._class_name = None self._class_name = None
self._color = None self._color = None
self._declawed = None self._declawed = None
# TODO: let required properties as mandatory parameter in the constructor. self.class_name = class_name
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if class_name is not None:
self.class_name = class_name
if color is not None: if color is not None:
self.color = color self.color = color
if declawed is not None: if declawed is not None:

View File

@@ -21,31 +21,33 @@ class Category(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'name': 'str'
}
attribute_map = {
'id': 'id',
'name': 'name'
}
def __init__(self, id=None, name=None): def __init__(self, id=None, name=None):
""" """
Category - a model defined in Swagger Category - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'id': 'int',
'name': 'str'
}
self.attribute_map = {
'id': 'id',
'name': 'name'
}
self._id = None self._id = None
self._name = None self._name = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if id is not None: if id is not None:
self.id = id self.id = id
if name is not None: if name is not None:

View File

@@ -21,28 +21,30 @@ class ClassModel(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'_class': 'str'
}
attribute_map = {
'_class': '_class'
}
def __init__(self, _class=None): def __init__(self, _class=None):
""" """
ClassModel - a model defined in Swagger ClassModel - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'_class': 'str'
}
self.attribute_map = {
'_class': '_class'
}
self.__class = None self.__class = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if _class is not None: if _class is not None:
self._class = _class self._class = _class

View File

@@ -21,28 +21,30 @@ class Client(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'client': 'str'
}
attribute_map = {
'client': 'client'
}
def __init__(self, client=None): def __init__(self, client=None):
""" """
Client - a model defined in Swagger Client - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'client': 'str'
}
self.attribute_map = {
'client': 'client'
}
self._client = None self._client = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if client is not None: if client is not None:
self.client = client self.client = client

View File

@@ -21,36 +21,37 @@ class Dog(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'class_name': 'str',
'color': 'str',
'breed': 'str'
}
attribute_map = {
'class_name': 'className',
'color': 'color',
'breed': 'breed'
}
def __init__(self, class_name=None, color='red', breed=None): def __init__(self, class_name=None, color='red', breed=None):
""" """
Dog - a model defined in Swagger Dog - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'class_name': 'str',
'color': 'str',
'breed': 'str'
}
self.attribute_map = {
'class_name': 'className',
'color': 'color',
'breed': 'breed'
}
self._class_name = None self._class_name = None
self._color = None self._color = None
self._breed = None self._breed = None
# TODO: let required properties as mandatory parameter in the constructor. self.class_name = class_name
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if class_name is not None:
self.class_name = class_name
if color is not None: if color is not None:
self.color = color self.color = color
if breed is not None: if breed is not None:

View File

@@ -21,31 +21,33 @@ class EnumArrays(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'just_symbol': 'str',
'array_enum': 'list[str]'
}
attribute_map = {
'just_symbol': 'just_symbol',
'array_enum': 'array_enum'
}
def __init__(self, just_symbol=None, array_enum=None): def __init__(self, just_symbol=None, array_enum=None):
""" """
EnumArrays - a model defined in Swagger EnumArrays - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'just_symbol': 'str',
'array_enum': 'list[str]'
}
self.attribute_map = {
'just_symbol': 'just_symbol',
'array_enum': 'array_enum'
}
self._just_symbol = None self._just_symbol = None
self._array_enum = None self._array_enum = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if just_symbol is not None: if just_symbol is not None:
self.just_symbol = just_symbol self.just_symbol = just_symbol
if array_enum is not None: if array_enum is not None:

View File

@@ -22,31 +22,34 @@ class EnumClass(object):
Do not edit the class manually. Do not edit the class manually.
""" """
"""
allowed enum values
"""
_ABC = "_abc" _ABC = "_abc"
_EFG = "-efg" _EFG = "-efg"
_XYZ_ = "(xyz)" _XYZ_ = "(xyz)"
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
}
attribute_map = {
}
def __init__(self): def __init__(self):
""" """
EnumClass - a model defined in Swagger EnumClass - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
}
self.attribute_map = {
}
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
def to_dict(self): def to_dict(self):
""" """

View File

@@ -21,37 +21,39 @@ class EnumTest(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'enum_string': 'str',
'enum_integer': 'int',
'enum_number': 'float',
'outer_enum': 'OuterEnum'
}
attribute_map = {
'enum_string': 'enum_string',
'enum_integer': 'enum_integer',
'enum_number': 'enum_number',
'outer_enum': 'outerEnum'
}
def __init__(self, enum_string=None, enum_integer=None, enum_number=None, outer_enum=None): def __init__(self, enum_string=None, enum_integer=None, enum_number=None, outer_enum=None):
""" """
EnumTest - a model defined in Swagger EnumTest - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'enum_string': 'str',
'enum_integer': 'int',
'enum_number': 'float',
'outer_enum': 'OuterEnum'
}
self.attribute_map = {
'enum_string': 'enum_string',
'enum_integer': 'enum_integer',
'enum_number': 'enum_number',
'outer_enum': 'outerEnum'
}
self._enum_string = None self._enum_string = None
self._enum_integer = None self._enum_integer = None
self._enum_number = None self._enum_number = None
self._outer_enum = None self._outer_enum = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if enum_string is not None: if enum_string is not None:
self.enum_string = enum_string self.enum_string = enum_string
if enum_integer is not None: if enum_integer is not None:

View File

@@ -21,46 +21,51 @@ class FormatTest(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'integer': 'int',
'int32': 'int',
'int64': 'int',
'number': 'float',
'float': 'float',
'double': 'float',
'string': 'str',
'byte': 'str',
'binary': 'str',
'date': 'date',
'date_time': 'datetime',
'uuid': 'str',
'password': 'str'
}
attribute_map = {
'integer': 'integer',
'int32': 'int32',
'int64': 'int64',
'number': 'number',
'float': 'float',
'double': 'double',
'string': 'string',
'byte': 'byte',
'binary': 'binary',
'date': 'date',
'date_time': 'dateTime',
'uuid': 'uuid',
'password': 'password'
}
def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None): def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None):
""" """
FormatTest - a model defined in Swagger FormatTest - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'integer': 'int',
'int32': 'int',
'int64': 'int',
'number': 'float',
'float': 'float',
'double': 'float',
'string': 'str',
'byte': 'str',
'binary': 'str',
'date': 'date',
'date_time': 'datetime',
'uuid': 'str',
'password': 'str'
}
self.attribute_map = {
'integer': 'integer',
'int32': 'int32',
'int64': 'int64',
'number': 'number',
'float': 'float',
'double': 'double',
'string': 'string',
'byte': 'byte',
'binary': 'binary',
'date': 'date',
'date_time': 'dateTime',
'uuid': 'uuid',
'password': 'password'
}
self._integer = None self._integer = None
self._int32 = None self._int32 = None
@@ -76,35 +81,28 @@ class FormatTest(object):
self._uuid = None self._uuid = None
self._password = None self._password = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if integer is not None: if integer is not None:
self.integer = integer self.integer = integer
if int32 is not None: if int32 is not None:
self.int32 = int32 self.int32 = int32
if int64 is not None: if int64 is not None:
self.int64 = int64 self.int64 = int64
if number is not None: self.number = number
self.number = number
if float is not None: if float is not None:
self.float = float self.float = float
if double is not None: if double is not None:
self.double = double self.double = double
if string is not None: if string is not None:
self.string = string self.string = string
if byte is not None: self.byte = byte
self.byte = byte
if binary is not None: if binary is not None:
self.binary = binary self.binary = binary
if date is not None: self.date = date
self.date = date
if date_time is not None: if date_time is not None:
self.date_time = date_time self.date_time = date_time
if uuid is not None: if uuid is not None:
self.uuid = uuid self.uuid = uuid
if password is not None: self.password = password
self.password = password
@property @property
def integer(self): def integer(self):

View File

@@ -21,31 +21,33 @@ class HasOnlyReadOnly(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'bar': 'str',
'foo': 'str'
}
attribute_map = {
'bar': 'bar',
'foo': 'foo'
}
def __init__(self, bar=None, foo=None): def __init__(self, bar=None, foo=None):
""" """
HasOnlyReadOnly - a model defined in Swagger HasOnlyReadOnly - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'bar': 'str',
'foo': 'str'
}
self.attribute_map = {
'bar': 'bar',
'foo': 'foo'
}
self._bar = None self._bar = None
self._foo = None self._foo = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if bar is not None: if bar is not None:
self.bar = bar self.bar = bar
if foo is not None: if foo is not None:

View File

@@ -21,28 +21,30 @@ class List(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'_123_list': 'str'
}
attribute_map = {
'_123_list': '123-list'
}
def __init__(self, _123_list=None): def __init__(self, _123_list=None):
""" """
List - a model defined in Swagger List - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'_123_list': 'str'
}
self.attribute_map = {
'_123_list': '123-list'
}
self.__123_list = None self.__123_list = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if _123_list is not None: if _123_list is not None:
self._123_list = _123_list self._123_list = _123_list

View File

@@ -21,31 +21,33 @@ class MapTest(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'map_map_of_string': 'dict(str, dict(str, str))',
'map_of_enum_string': 'dict(str, str)'
}
attribute_map = {
'map_map_of_string': 'map_map_of_string',
'map_of_enum_string': 'map_of_enum_string'
}
def __init__(self, map_map_of_string=None, map_of_enum_string=None): def __init__(self, map_map_of_string=None, map_of_enum_string=None):
""" """
MapTest - a model defined in Swagger MapTest - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'map_map_of_string': 'dict(str, dict(str, str))',
'map_of_enum_string': 'dict(str, str)'
}
self.attribute_map = {
'map_map_of_string': 'map_map_of_string',
'map_of_enum_string': 'map_of_enum_string'
}
self._map_map_of_string = None self._map_map_of_string = None
self._map_of_enum_string = None self._map_of_enum_string = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if map_map_of_string is not None: if map_map_of_string is not None:
self.map_map_of_string = map_map_of_string self.map_map_of_string = map_map_of_string
if map_of_enum_string is not None: if map_of_enum_string is not None:

View File

@@ -21,34 +21,36 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'uuid': 'str',
'date_time': 'datetime',
'map': 'dict(str, Animal)'
}
attribute_map = {
'uuid': 'uuid',
'date_time': 'dateTime',
'map': 'map'
}
def __init__(self, uuid=None, date_time=None, map=None): def __init__(self, uuid=None, date_time=None, map=None):
""" """
MixedPropertiesAndAdditionalPropertiesClass - a model defined in Swagger MixedPropertiesAndAdditionalPropertiesClass - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'uuid': 'str',
'date_time': 'datetime',
'map': 'dict(str, Animal)'
}
self.attribute_map = {
'uuid': 'uuid',
'date_time': 'dateTime',
'map': 'map'
}
self._uuid = None self._uuid = None
self._date_time = None self._date_time = None
self._map = None self._map = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if uuid is not None: if uuid is not None:
self.uuid = uuid self.uuid = uuid
if date_time is not None: if date_time is not None:

View File

@@ -21,31 +21,33 @@ class Model200Response(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'name': 'int',
'_class': 'str'
}
attribute_map = {
'name': 'name',
'_class': 'class'
}
def __init__(self, name=None, _class=None): def __init__(self, name=None, _class=None):
""" """
Model200Response - a model defined in Swagger Model200Response - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'name': 'int',
'_class': 'str'
}
self.attribute_map = {
'name': 'name',
'_class': 'class'
}
self._name = None self._name = None
self.__class = None self.__class = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if name is not None: if name is not None:
self.name = name self.name = name
if _class is not None: if _class is not None:

View File

@@ -21,28 +21,30 @@ class ModelReturn(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'_return': 'int'
}
attribute_map = {
'_return': 'return'
}
def __init__(self, _return=None): def __init__(self, _return=None):
""" """
ModelReturn - a model defined in Swagger ModelReturn - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'_return': 'int'
}
self.attribute_map = {
'_return': 'return'
}
self.__return = None self.__return = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if _return is not None: if _return is not None:
self._return = _return self._return = _return

View File

@@ -21,39 +21,40 @@ class Name(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'name': 'int',
'snake_case': 'int',
'_property': 'str',
'_123_number': 'int'
}
attribute_map = {
'name': 'name',
'snake_case': 'snake_case',
'_property': 'property',
'_123_number': '123Number'
}
def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): def __init__(self, name=None, snake_case=None, _property=None, _123_number=None):
""" """
Name - a model defined in Swagger Name - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'name': 'int',
'snake_case': 'int',
'_property': 'str',
'_123_number': 'int'
}
self.attribute_map = {
'name': 'name',
'snake_case': 'snake_case',
'_property': 'property',
'_123_number': '123Number'
}
self._name = None self._name = None
self._snake_case = None self._snake_case = None
self.__property = None self.__property = None
self.__123_number = None self.__123_number = None
# TODO: let required properties as mandatory parameter in the constructor. self.name = name
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if name is not None:
self.name = name
if snake_case is not None: if snake_case is not None:
self.snake_case = snake_case self.snake_case = snake_case
if _property is not None: if _property is not None:

View File

@@ -21,28 +21,30 @@ class NumberOnly(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'just_number': 'float'
}
attribute_map = {
'just_number': 'JustNumber'
}
def __init__(self, just_number=None): def __init__(self, just_number=None):
""" """
NumberOnly - a model defined in Swagger NumberOnly - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'just_number': 'float'
}
self.attribute_map = {
'just_number': 'JustNumber'
}
self._just_number = None self._just_number = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if just_number is not None: if just_number is not None:
self.just_number = just_number self.just_number = just_number

View File

@@ -21,32 +21,37 @@ class Order(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'pet_id': 'int',
'quantity': 'int',
'ship_date': 'datetime',
'status': 'str',
'complete': 'bool'
}
attribute_map = {
'id': 'id',
'pet_id': 'petId',
'quantity': 'quantity',
'ship_date': 'shipDate',
'status': 'status',
'complete': 'complete'
}
def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False):
""" """
Order - a model defined in Swagger Order - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'id': 'int',
'pet_id': 'int',
'quantity': 'int',
'ship_date': 'datetime',
'status': 'str',
'complete': 'bool'
}
self.attribute_map = {
'id': 'id',
'pet_id': 'petId',
'quantity': 'quantity',
'ship_date': 'shipDate',
'status': 'status',
'complete': 'complete'
}
self._id = None self._id = None
self._pet_id = None self._pet_id = None
@@ -55,9 +60,6 @@ class Order(object):
self._status = None self._status = None
self._complete = None self._complete = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if id is not None: if id is not None:
self.id = id self.id = id
if pet_id is not None: if pet_id is not None:

View File

@@ -22,31 +22,34 @@ class OuterEnum(object):
Do not edit the class manually. Do not edit the class manually.
""" """
"""
allowed enum values
"""
PLACED = "placed" PLACED = "placed"
APPROVED = "approved" APPROVED = "approved"
DELIVERED = "delivered" DELIVERED = "delivered"
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
}
attribute_map = {
}
def __init__(self): def __init__(self):
""" """
OuterEnum - a model defined in Swagger OuterEnum - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
}
self.attribute_map = {
}
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
def to_dict(self): def to_dict(self):
""" """

View File

@@ -21,32 +21,37 @@ class Pet(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'category': 'Category',
'name': 'str',
'photo_urls': 'list[str]',
'tags': 'list[Tag]',
'status': 'str'
}
attribute_map = {
'id': 'id',
'category': 'category',
'name': 'name',
'photo_urls': 'photoUrls',
'tags': 'tags',
'status': 'status'
}
def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None):
""" """
Pet - a model defined in Swagger Pet - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'id': 'int',
'category': 'Category',
'name': 'str',
'photo_urls': 'list[str]',
'tags': 'list[Tag]',
'status': 'str'
}
self.attribute_map = {
'id': 'id',
'category': 'category',
'name': 'name',
'photo_urls': 'photoUrls',
'tags': 'tags',
'status': 'status'
}
self._id = None self._id = None
self._category = None self._category = None
@@ -55,17 +60,12 @@ class Pet(object):
self._tags = None self._tags = None
self._status = None self._status = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if id is not None: if id is not None:
self.id = id self.id = id
if category is not None: if category is not None:
self.category = category self.category = category
if name is not None: self.name = name
self.name = name self.photo_urls = photo_urls
if photo_urls is not None:
self.photo_urls = photo_urls
if tags is not None: if tags is not None:
self.tags = tags self.tags = tags
if status is not None: if status is not None:

View File

@@ -21,31 +21,33 @@ class ReadOnlyFirst(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'bar': 'str',
'baz': 'str'
}
attribute_map = {
'bar': 'bar',
'baz': 'baz'
}
def __init__(self, bar=None, baz=None): def __init__(self, bar=None, baz=None):
""" """
ReadOnlyFirst - a model defined in Swagger ReadOnlyFirst - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'bar': 'str',
'baz': 'str'
}
self.attribute_map = {
'bar': 'bar',
'baz': 'baz'
}
self._bar = None self._bar = None
self._baz = None self._baz = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if bar is not None: if bar is not None:
self.bar = bar self.bar = bar
if baz is not None: if baz is not None:

View File

@@ -21,28 +21,30 @@ class SpecialModelName(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'special_property_name': 'int'
}
attribute_map = {
'special_property_name': '$special[property.name]'
}
def __init__(self, special_property_name=None): def __init__(self, special_property_name=None):
""" """
SpecialModelName - a model defined in Swagger SpecialModelName - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'special_property_name': 'int'
}
self.attribute_map = {
'special_property_name': '$special[property.name]'
}
self._special_property_name = None self._special_property_name = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if special_property_name is not None: if special_property_name is not None:
self.special_property_name = special_property_name self.special_property_name = special_property_name

View File

@@ -21,31 +21,33 @@ class Tag(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'name': 'str'
}
attribute_map = {
'id': 'id',
'name': 'name'
}
def __init__(self, id=None, name=None): def __init__(self, id=None, name=None):
""" """
Tag - a model defined in Swagger Tag - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'id': 'int',
'name': 'str'
}
self.attribute_map = {
'id': 'id',
'name': 'name'
}
self._id = None self._id = None
self._name = None self._name = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if id is not None: if id is not None:
self.id = id self.id = id
if name is not None: if name is not None:

View File

@@ -21,36 +21,41 @@ class User(object):
NOTE: This class is auto generated by the swagger code generator program. NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. Do not edit the class manually.
""" """
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'username': 'str',
'first_name': 'str',
'last_name': 'str',
'email': 'str',
'password': 'str',
'phone': 'str',
'user_status': 'int'
}
attribute_map = {
'id': 'id',
'username': 'username',
'first_name': 'firstName',
'last_name': 'lastName',
'email': 'email',
'password': 'password',
'phone': 'phone',
'user_status': 'userStatus'
}
def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None):
""" """
User - a model defined in Swagger User - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
""" """
self.swagger_types = {
'id': 'int',
'username': 'str',
'first_name': 'str',
'last_name': 'str',
'email': 'str',
'password': 'str',
'phone': 'str',
'user_status': 'int'
}
self.attribute_map = {
'id': 'id',
'username': 'username',
'first_name': 'firstName',
'last_name': 'lastName',
'email': 'email',
'password': 'password',
'phone': 'phone',
'user_status': 'userStatus'
}
self._id = None self._id = None
self._username = None self._username = None
@@ -61,9 +66,6 @@ class User(object):
self._phone = None self._phone = None
self._user_status = None self._user_status = None
# TODO: let required properties as mandatory parameter in the constructor.
# - to check if required property is not None (e.g. by calling setter)
# - ApiClient.__deserialize_model has to be adapted as well
if id is not None: if id is not None:
self.id = id self.id = id
if username is not None: if username is not None:

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestAdditionalPropertiesClass(unittest.TestCase):
""" """
Test AdditionalPropertiesClass Test AdditionalPropertiesClass
""" """
model = petstore_api.models.additional_properties_class.AdditionalPropertiesClass() # FIXME: construct object with required attributes
#model = petstore_api.models.additional_properties_class.AdditionalPropertiesClass()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestAnimal(unittest.TestCase):
""" """
Test Animal Test Animal
""" """
model = petstore_api.models.animal.Animal() # FIXME: construct object with required attributes
#model = petstore_api.models.animal.Animal()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestAnimalFarm(unittest.TestCase):
""" """
Test AnimalFarm Test AnimalFarm
""" """
model = petstore_api.models.animal_farm.AnimalFarm() # FIXME: construct object with required attributes
#model = petstore_api.models.animal_farm.AnimalFarm()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestApiResponse(unittest.TestCase):
""" """
Test ApiResponse Test ApiResponse
""" """
model = petstore_api.models.api_response.ApiResponse() # FIXME: construct object with required attributes
#model = petstore_api.models.api_response.ApiResponse()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestArrayOfArrayOfNumberOnly(unittest.TestCase):
""" """
Test ArrayOfArrayOfNumberOnly Test ArrayOfArrayOfNumberOnly
""" """
model = petstore_api.models.array_of_array_of_number_only.ArrayOfArrayOfNumberOnly() # FIXME: construct object with required attributes
#model = petstore_api.models.array_of_array_of_number_only.ArrayOfArrayOfNumberOnly()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestArrayOfNumberOnly(unittest.TestCase):
""" """
Test ArrayOfNumberOnly Test ArrayOfNumberOnly
""" """
model = petstore_api.models.array_of_number_only.ArrayOfNumberOnly() # FIXME: construct object with required attributes
#model = petstore_api.models.array_of_number_only.ArrayOfNumberOnly()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestArrayTest(unittest.TestCase):
""" """
Test ArrayTest Test ArrayTest
""" """
model = petstore_api.models.array_test.ArrayTest() # FIXME: construct object with required attributes
#model = petstore_api.models.array_test.ArrayTest()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -35,7 +35,9 @@ class TestCapitalization(unittest.TestCase):
""" """
Test Capitalization Test Capitalization
""" """
model = petstore_api.models.capitalization.Capitalization() # FIXME: construct object with required attributes
#model = petstore_api.models.capitalization.Capitalization()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestCat(unittest.TestCase):
""" """
Test Cat Test Cat
""" """
model = petstore_api.models.cat.Cat() # FIXME: construct object with required attributes
#model = petstore_api.models.cat.Cat()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestCategory(unittest.TestCase):
""" """
Test Category Test Category
""" """
model = petstore_api.models.category.Category() # FIXME: construct object with required attributes
#model = petstore_api.models.category.Category()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -35,7 +35,9 @@ class TestClassModel(unittest.TestCase):
""" """
Test ClassModel Test ClassModel
""" """
model = petstore_api.models.class_model.ClassModel() # FIXME: construct object with required attributes
#model = petstore_api.models.class_model.ClassModel()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestClient(unittest.TestCase):
""" """
Test Client Test Client
""" """
model = petstore_api.models.client.Client() # FIXME: construct object with required attributes
#model = petstore_api.models.client.Client()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestDog(unittest.TestCase):
""" """
Test Dog Test Dog
""" """
model = petstore_api.models.dog.Dog() # FIXME: construct object with required attributes
#model = petstore_api.models.dog.Dog()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestEnumArrays(unittest.TestCase):
""" """
Test EnumArrays Test EnumArrays
""" """
model = petstore_api.models.enum_arrays.EnumArrays() # FIXME: construct object with required attributes
#model = petstore_api.models.enum_arrays.EnumArrays()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestEnumClass(unittest.TestCase):
""" """
Test EnumClass Test EnumClass
""" """
model = petstore_api.models.enum_class.EnumClass() # FIXME: construct object with required attributes
#model = petstore_api.models.enum_class.EnumClass()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestEnumTest(unittest.TestCase):
""" """
Test EnumTest Test EnumTest
""" """
model = petstore_api.models.enum_test.EnumTest() # FIXME: construct object with required attributes
#model = petstore_api.models.enum_test.EnumTest()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -42,6 +31,14 @@ class TestFakeApi(unittest.TestCase):
def tearDown(self): def tearDown(self):
pass pass
def test_test_client_model(self):
"""
Test case for test_client_model
To test \"client\" model
"""
pass
def test_test_endpoint_parameters(self): def test_test_endpoint_parameters(self):
""" """
Test case for test_endpoint_parameters Test case for test_endpoint_parameters
@@ -50,6 +47,14 @@ class TestFakeApi(unittest.TestCase):
""" """
pass pass
def test_test_enum_parameters(self):
"""
Test case for test_enum_parameters
To test enum parameters
"""
pass
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()

View File

@@ -1,44 +0,0 @@
# coding: utf-8
"""
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
import unittest
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.apis.fake_classname_tags_123_api import FakeClassnameTags123Api
class TestFakeClassnameTags123Api(unittest.TestCase):
""" FakeClassnameTags123Api unit test stubs """
def setUp(self):
self.api = petstore_api.apis.fake_classname_tags_123_api.FakeClassnameTags123Api()
def tearDown(self):
pass
def test_test_classname(self):
"""
Test case for test_classname
To test class name in snake case
"""
pass
if __name__ == '__main__':
unittest.main()

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestFormatTest(unittest.TestCase):
""" """
Test FormatTest Test FormatTest
""" """
model = petstore_api.models.format_test.FormatTest() # FIXME: construct object with required attributes
#model = petstore_api.models.format_test.FormatTest()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestHasOnlyReadOnly(unittest.TestCase):
""" """
Test HasOnlyReadOnly Test HasOnlyReadOnly
""" """
model = petstore_api.models.has_only_read_only.HasOnlyReadOnly() # FIXME: construct object with required attributes
#model = petstore_api.models.has_only_read_only.HasOnlyReadOnly()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestList(unittest.TestCase):
""" """
Test List Test List
""" """
model = petstore_api.models.list.List() # FIXME: construct object with required attributes
#model = petstore_api.models.list.List()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestMapTest(unittest.TestCase):
""" """
Test MapTest Test MapTest
""" """
model = petstore_api.models.map_test.MapTest() # FIXME: construct object with required attributes
#model = petstore_api.models.map_test.MapTest()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase):
""" """
Test MixedPropertiesAndAdditionalPropertiesClass Test MixedPropertiesAndAdditionalPropertiesClass
""" """
model = petstore_api.models.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass() # FIXME: construct object with required attributes
#model = petstore_api.models.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestModel200Response(unittest.TestCase):
""" """
Test Model200Response Test Model200Response
""" """
model = petstore_api.models.model_200_response.Model200Response() # FIXME: construct object with required attributes
#model = petstore_api.models.model_200_response.Model200Response()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestModelReturn(unittest.TestCase):
""" """
Test ModelReturn Test ModelReturn
""" """
model = petstore_api.models.model_return.ModelReturn() # FIXME: construct object with required attributes
#model = petstore_api.models.model_return.ModelReturn()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestName(unittest.TestCase):
""" """
Test Name Test Name
""" """
model = petstore_api.models.name.Name() # FIXME: construct object with required attributes
#model = petstore_api.models.name.Name()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -8,20 +8,9 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestNumberOnly(unittest.TestCase):
""" """
Test NumberOnly Test NumberOnly
""" """
model = petstore_api.models.number_only.NumberOnly() # FIXME: construct object with required attributes
#model = petstore_api.models.number_only.NumberOnly()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestOrder(unittest.TestCase):
""" """
Test Order Test Order
""" """
model = petstore_api.models.order.Order() # FIXME: construct object with required attributes
#model = petstore_api.models.order.Order()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -35,7 +35,9 @@ class TestOuterEnum(unittest.TestCase):
""" """
Test OuterEnum Test OuterEnum
""" """
model = petstore_api.models.outer_enum.OuterEnum() # FIXME: construct object with required attributes
#model = petstore_api.models.outer_enum.OuterEnum()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestPet(unittest.TestCase):
""" """
Test Pet Test Pet
""" """
model = petstore_api.models.pet.Pet() # FIXME: construct object with required attributes
#model = petstore_api.models.pet.Pet()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestReadOnlyFirst(unittest.TestCase):
""" """
Test ReadOnlyFirst Test ReadOnlyFirst
""" """
model = petstore_api.models.read_only_first.ReadOnlyFirst() # FIXME: construct object with required attributes
#model = petstore_api.models.read_only_first.ReadOnlyFirst()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestSpecialModelName(unittest.TestCase):
""" """
Test SpecialModelName Test SpecialModelName
""" """
model = petstore_api.models.special_model_name.SpecialModelName() # FIXME: construct object with required attributes
#model = petstore_api.models.special_model_name.SpecialModelName()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestTag(unittest.TestCase):
""" """
Test Tag Test Tag
""" """
model = petstore_api.models.tag.Tag() # FIXME: construct object with required attributes
#model = petstore_api.models.tag.Tag()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os
@@ -46,7 +35,9 @@ class TestUser(unittest.TestCase):
""" """
Test User Test User
""" """
model = petstore_api.models.user.User() # FIXME: construct object with required attributes
#model = petstore_api.models.user.User()
pass
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -3,25 +3,14 @@
""" """
Swagger Petstore Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import os import os

View File

@@ -139,9 +139,8 @@ class ApiClientTests(unittest.TestCase):
"status": "available", "status": "available",
"photoUrls": ["http://foo.bar.com/3", "photoUrls": ["http://foo.bar.com/3",
"http://foo.bar.com/4"]} "http://foo.bar.com/4"]}
pet = petstore_api.Pet() pet = petstore_api.Pet(name=pet_dict["name"], photo_urls=pet_dict["photoUrls"])
pet.id = pet_dict["id"] pet.id = pet_dict["id"]
pet.name = pet_dict["name"]
cate = petstore_api.Category() cate = petstore_api.Category()
cate.id = pet_dict["category"]["id"] cate.id = pet_dict["category"]["id"]
cate.name = pet_dict["category"]["name"] cate.name = pet_dict["category"]["name"]
@@ -154,7 +153,6 @@ class ApiClientTests(unittest.TestCase):
tag2.name = pet_dict["tags"][1]["name"] tag2.name = pet_dict["tags"][1]["name"]
pet.tags = [tag1, tag2] pet.tags = [tag1, tag2]
pet.status = pet_dict["status"] pet.status = pet_dict["status"]
pet.photo_urls = pet_dict["photoUrls"]
data = pet data = pet
result = self.api_client.sanitize_for_serialization(data) result = self.api_client.sanitize_for_serialization(data)

View File

@@ -30,10 +30,8 @@ class ApiExceptionTests(unittest.TestCase):
self.tag = petstore_api.Tag() self.tag = petstore_api.Tag()
self.tag.id = id_gen() self.tag.id = id_gen()
self.tag.name = "blank" self.tag.name = "blank"
self.pet = petstore_api.Pet() self.pet = petstore_api.Pet(name="hello kity", photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"])
self.pet.id = id_gen() self.pet.id = id_gen()
self.pet.name = "hello kity"
self.pet.photo_urls = ["http://foo.bar.com/1", "http://foo.bar.com/2"]
self.pet.status = "sold" self.pet.status = "sold"
self.pet.category = self.category self.pet.category = self.category
self.pet.tags = [self.tag] self.pet.tags = [self.tag]

View File

@@ -20,6 +20,26 @@ class DeserializationTests(unittest.TestCase):
self.api_client = petstore_api.ApiClient() self.api_client = petstore_api.ApiClient()
self.deserialize = self.api_client._ApiClient__deserialize self.deserialize = self.api_client._ApiClient__deserialize
def test_enum_test(self):
""" deserialize dict(str, Enum_Test) """
data = {
'enum_test': {
"enum_string": "UPPER",
"enum_integer": 1,
"enum_number": 1.1,
"outerEnum": "placed"
}
}
deserialized = self.deserialize(data, 'dict(str, EnumTest)')
self.assertTrue(isinstance(deserialized, dict))
self.assertTrue(isinstance(deserialized['enum_test'], petstore_api.EnumTest))
self.assertEqual(deserialized['enum_test'],
petstore_api.EnumTest(enum_string="UPPER",
enum_integer=1,
enum_number=1.1,
outer_enum=petstore_api.OuterEnum.PLACED))
def test_deserialize_dict_str_pet(self): def test_deserialize_dict_str_pet(self):
""" deserialize dict(str, Pet) """ """ deserialize dict(str, Pet) """
data = { data = {

View File

@@ -62,10 +62,8 @@ class PetApiTests(unittest.TestCase):
self.tag = petstore_api.Tag() self.tag = petstore_api.Tag()
self.tag.id = id_gen() self.tag.id = id_gen()
self.tag.name = "swagger-codegen-python-pet-tag" self.tag.name = "swagger-codegen-python-pet-tag"
self.pet = petstore_api.Pet() self.pet = petstore_api.Pet(name="hello kity", photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"])
self.pet.id = id_gen() self.pet.id = id_gen()
self.pet.name = "hello kity"
self.pet.photo_urls = ["http://foo.bar.com/1", "http://foo.bar.com/2"]
self.pet.status = "sold" self.pet.status = "sold"
self.pet.category = self.category self.pet.category = self.category
self.pet.tags = [self.tag] self.pet.tags = [self.tag]

View File

@@ -17,10 +17,8 @@ import petstore_api
class PetModelTests(unittest.TestCase): class PetModelTests(unittest.TestCase):
def setUp(self): def setUp(self):
self.pet = petstore_api.Pet() self.pet = petstore_api.Pet(name="test name", photo_urls=["string"])
self.pet.name = "test name"
self.pet.id = 1 self.pet.id = 1
self.pet.photo_urls = ["string"]
self.pet.status = "available" self.pet.status = "available"
cate = petstore_api.Category() cate = petstore_api.Category()
cate.id = 1 cate.id = 1
@@ -40,10 +38,8 @@ class PetModelTests(unittest.TestCase):
self.assertEqual(data, self.pet.to_str()) self.assertEqual(data, self.pet.to_str())
def test_equal(self): def test_equal(self):
self.pet1 = petstore_api.Pet() self.pet1 = petstore_api.Pet(name="test name", photo_urls=["string"])
self.pet1.name = "test name"
self.pet1.id = 1 self.pet1.id = 1
self.pet1.photo_urls = ["string"]
self.pet1.status = "available" self.pet1.status = "available"
cate1 = petstore_api.Category() cate1 = petstore_api.Category()
cate1.id = 1 cate1.id = 1
@@ -53,10 +49,8 @@ class PetModelTests(unittest.TestCase):
tag1.id = 1 tag1.id = 1
self.pet1.tags = [tag1] self.pet1.tags = [tag1]
self.pet2 = petstore_api.Pet() self.pet2 = petstore_api.Pet(name="test name", photo_urls=["string"])
self.pet2.name = "test name"
self.pet2.id = 1 self.pet2.id = 1
self.pet2.photo_urls = ["string"]
self.pet2.status = "available" self.pet2.status = "available"
cate2 = petstore_api.Category() cate2 = petstore_api.Category()
cate2.id = 1 cate2.id = 1