[python] Add ability to get allowed values (#4138)

* Add function to get list of allowed values

* [python] Add function to get list of allowed values

* Remove temporary variable

* Remove static method and use a variable

* Remove classname
This commit is contained in:
Arun
2019-10-24 14:58:29 +05:30
committed by William Cheng
parent 84c6a7c1e7
commit 652b0f5bf6
8 changed files with 18 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ class {{classname}}(object):
{{/-last}}
{{/enumVars}}{{/allowableValues}}
{{#allowableValues}}
allowable_values = [{{#enumVars}}{{name}}{{^-last}}, {{/-last}}{{/enumVars}}] # noqa: E501
{{/allowableValues}}
"""
Attributes:
openapi_types (dict): The key is attribute name