summaryrefslogtreecommitdiff
path: root/rest-api-templates/ari_model_validators.c.mustache
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-10-24 20:48:17 +0000
committerDavid M. Lee <dlee@digium.com>2013-10-24 20:48:17 +0000
commit32b4e7943427ec9c17d6388cd0f7e0ce3ef992f2 (patch)
treebc8b565c132f2155112c7be9f2191324bb3c214c /rest-api-templates/ari_model_validators.c.mustache
parent6fb07febbc43c1c4cbcef596a908b684b9bf95a6 (diff)
The Swagger 1.2 specification for type extension ended up being
slightly different than my proposal. Instead of putting an 'extends' field on the subtype, the base type has a 'subTypes' field, which is a list of the subTypes. Given that its a messaging model and not an object model, kinda makes sense. This patch changes the events.json api-doc, and the python translators to take the new format into account. Other changes that are in Swagger 1.2 were not adopted, since the spec is still in flux, and could change before it's finalized. A summary of changes to the Swagger-1.2 spec can be found at https://github.com/wordnik/swagger-core/wiki/1.2-transition. (closes issue ASTERISK-22440) Review: https://reviewboard.asterisk.org/r/2909/ ........ Merged revisions 401701 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rest-api-templates/ari_model_validators.c.mustache')
-rw-r--r--rest-api-templates/ari_model_validators.c.mustache4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest-api-templates/ari_model_validators.c.mustache b/rest-api-templates/ari_model_validators.c.mustache
index 7bb527898..9d3167156 100644
--- a/rest-api-templates/ari_model_validators.c.mustache
+++ b/rest-api-templates/ari_model_validators.c.mustache
@@ -57,11 +57,11 @@ int ast_ari_validate_{{c_id}}(struct ast_json *json)
if (strcmp("{{id}}", discriminator) == 0) {
/* Self type; fall through */
} else
-{{#subtypes}}
+{{#all_subtypes}}
if (strcmp("{{id}}", discriminator) == 0) {
return ast_ari_validate_{{c_id}}(json);
} else
-{{/subtypes}}
+{{/all_subtypes}}
{
ast_log(LOG_ERROR, "ARI {{id}} has undocumented subtype %s\n",
discriminator);