mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
Add missing OPTIONAL_API and ARI dependences.
I've audited all modules that include any header which includes asterisk/optional_api.h. All modules which use OPTIONAL_API now declare those dependencies in AST_MODULE_INFO using requires or optional_modules as appropriate. In addition ARI dependency declarations have been reworked. Instead of declaring additional required modules in res/ari/resource_*.c we now add them to an optional array "requiresModules" in api-docs for each module. This allows the AST_MODULE_INFO dependencies to include those missing modules. Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
This commit is contained in:
@@ -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}}
|
||||
|
@@ -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]
|
||||
|
Reference in New Issue
Block a user