mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-16 15:39:06 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user