Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{{#isEnum}}

"""
allowed enum values
"""

{{#allowableValues}}
{{#enumVars}}
{{name}} = {{{value}}},
{{/enumVars}}
{{/allowableValues}}

{{/isEnum}}
allowed_values = {
{{#isEnum}}
('value',): {
Expand Down Expand Up @@ -135,4 +148,4 @@
}
if not val:
return None
return {'{{{discriminatorName}}}': val}{{/discriminator}}
return {'{{{discriminatorName}}}': val}{{/discriminator}}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def discriminator():
return None



attribute_map = {
'map_string': 'map_string', # noqa: E501
'map_number': 'map_number', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def discriminator():
return None
return {'class_name': val}


attribute_map = {
'class_name': 'className', # noqa: E501
'color': 'color', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def discriminator():
return None



attribute_map = {}

read_only_vars = set()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def discriminator():
return None



attribute_map = {
'code': 'code', # noqa: E501
'type': 'type', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'array_array_number': 'ArrayArrayNumber', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'array_number': 'ArrayNumber', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def discriminator():
return None



attribute_map = {
'array_of_string': 'array_of_string', # noqa: E501
'array_array_of_integer': 'array_array_of_integer', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def discriminator():
return None



attribute_map = {
'small_camel': 'smallCamel', # noqa: E501
'capital_camel': 'CapitalCamel', # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/petstore_api/model/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def discriminator():
return None
return {'class_name': val}


attribute_map = {
'class_name': 'className', # noqa: E501
'declawed': 'declawed', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'declawed': 'declawed', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
'id': 'id', # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/petstore_api/model/child.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def discriminator():
return None



attribute_map = {
'radio_waves': 'radioWaves', # noqa: E501
'tele_vision': 'teleVision', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'inter_net': 'interNet', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def discriminator():
return None
return {'pet_type': val}


attribute_map = {
'pet_type': 'pet_type', # noqa: E501
'name': 'name', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def discriminator():
return None
return {'pet_type': val}


attribute_map = {
'pet_type': 'pet_type', # noqa: E501
'bark': 'bark', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'bark': 'bark', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def discriminator():
return None
return {'pet_type': val}


attribute_map = {
'pet_type': 'pet_type', # noqa: E501
'loves_rocks': 'lovesRocks', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'loves_rocks': 'lovesRocks', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'_class': '_class', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'client': 'client', # noqa: E501
}
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/petstore_api/model/dog.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def discriminator():
return None
return {'class_name': val}


attribute_map = {
'class_name': 'className', # noqa: E501
'breed': 'breed', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'breed': 'breed', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def discriminator():
return None



attribute_map = {
'just_symbol': 'just_symbol', # noqa: E501
'array_enum': 'array_enum', # noqa: E501
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/python/petstore_api/model/enum_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ class EnumClass(ModelSimple):
as additional properties values.
"""


"""
allowed enum values
"""

_ABC = "_abc",
-EFG = "-efg",
(XYZ) = "(xyz)",

allowed_values = {
('value',): {
'_ABC': "_abc",
Expand Down Expand Up @@ -84,6 +93,7 @@ def discriminator():
return None



attribute_map = {}

read_only_vars = set()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def discriminator():
return None



attribute_map = {
'enum_string_required': 'enum_string_required', # noqa: E501
'enum_string': 'enum_string', # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/petstore_api/model/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'source_uri': 'sourceURI', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def discriminator():
return None



attribute_map = {
'file': 'file', # noqa: E501
'files': 'files', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def discriminator():
return None



attribute_map = {
'number': 'number', # noqa: E501
'byte': 'byte', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'radio_waves': 'radioWaves', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def discriminator():
return None
return {'pet_type': val}


attribute_map = {
'pet_type': 'pet_type', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def discriminator():
return None



attribute_map = {
'bar': 'bar', # noqa: E501
'foo': 'foo', # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/petstore_api/model/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'_123_list': '123-list', # noqa: E501
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def discriminator():
return None



attribute_map = {
'map_map_of_string': 'map_map_of_string', # noqa: E501
'map_of_enum_string': 'map_of_enum_string', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def discriminator():
return None



attribute_map = {
'uuid': 'uuid', # noqa: E501
'date_time': 'dateTime', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
'_class': 'class', # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def discriminator():
return None



attribute_map = {
'_return': 'return', # noqa: E501
}
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/petstore_api/model/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def discriminator():
return None



attribute_map = {
'name': 'name', # noqa: E501
'snake_case': 'snake_case', # noqa: E501
Expand Down
Loading