From 7f9b28b0c6d53837049b026103d56467b3f89e7d Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Tue, 27 Jan 2015 17:20:23 +0000 Subject: ARI: Improve wiki documentation This patch improves the documentation of ARI on the wiki. Specifically, it addresses the following: * Allowed values and allowed ranges weren't documented. This was particularly frustrating, as Asterisk would reject query parameters with disallowed values - but we didn't tell anyone what the allowed values were. * The /play/id operation on /channels and /bridges failed to document all of the added media resource types. * Documentation for creating a channel into a Stasis application failed to note when it occurred, and that creating a channel into Stasis conflicts with creating a channel into the dialplan. * Some other minor tweaks in the mustache templates, including italicizing the parameter type, putting the default value on its own sub-bullet, and some other nicities. Review: https://reviewboard.asterisk.org/r/4351 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431145 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- rest-api-templates/swagger_model.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rest-api-templates/swagger_model.py') 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. -- cgit v1.2.3