summaryrefslogtreecommitdiff
path: root/rest-api-templates
diff options
context:
space:
mode:
Diffstat (limited to 'rest-api-templates')
-rw-r--r--rest-api-templates/res_ari_resource.c.mustache5
-rw-r--r--rest-api-templates/swagger_model.py1
2 files changed, 5 insertions, 1 deletions
diff --git a/rest-api-templates/res_ari_resource.c.mustache b/rest-api-templates/res_ari_resource.c.mustache
index c1f680f21..c69734539 100644
--- a/rest-api-templates/res_ari_resource.c.mustache
+++ b/rest-api-templates/res_ari_resource.c.mustache
@@ -40,6 +40,9 @@
<depend type="module">res_ari</depend>
<depend type="module">res_ari_model</depend>
<depend type="module">res_stasis</depend>
+{{#requires_modules}}
+ <depend type="module">{{.}}</depend>
+{{/requires_modules}}
<support_level>core</support_level>
***/
@@ -324,6 +327,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - {{{
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .requires = "res_ari,res_ari_model,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis{{#requires_modules}},{{.}}{{/requires_modules}}",
);
{{/api_declaration}}
diff --git a/rest-api-templates/swagger_model.py b/rest-api-templates/swagger_model.py
index 08852415c..3f729d8b5 100644
--- a/rest-api-templates/swagger_model.py
+++ b/rest-api-templates/swagger_model.py
@@ -647,6 +647,7 @@ class ApiDeclaration(Stringify):
self.api_version = api_decl_json.get('apiVersion')
self.base_path = api_decl_json.get('basePath')
self.resource_path = api_decl_json.get('resourcePath')
+ self.requires_modules = api_decl_json.get('requiresModules') or []
api_json = api_decl_json.get('apis') or []
self.apis = [
Api().load(j, processor, context) for j in api_json]