diff options
Diffstat (limited to 'rest-api-templates/swagger_model.py')
-rw-r--r-- | rest-api-templates/swagger_model.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rest-api-templates/swagger_model.py b/rest-api-templates/swagger_model.py index 9c65219e5..f3b49e12e 100644 --- a/rest-api-templates/swagger_model.py +++ b/rest-api-templates/swagger_model.py @@ -220,6 +220,9 @@ class AllowableRange(Stringify): self.min_value = min_value self.max_value = max_value + def to_wiki(self): + return "Allowed range: Min: {0}; Max: {1}".format(self.min_value, self.max_value) + class AllowableList(Stringify): """Model of a allowableValues of type LIST @@ -229,6 +232,9 @@ class AllowableList(Stringify): def __init__(self, values): self.values = values + def to_wiki(self): + return "Allowed values: {0}".format(", ".join(self.values)) + def load_allowable_values(json, context): """Parse a JSON allowableValues object. |