res_ari: Add http prefix to generated docs

updated the uri handler to include the url prefix of the http server
this enables res_ari to add it to the uris when generating docs

Change-Id: I279335a2625261a8492206c37219698f42591c2e
(cherry picked from commit 6f448f32fe)
This commit is contained in:
Torrey Searle
2016-08-17 15:10:54 +02:00
committed by Joshua Colp
parent 2b057d6215
commit c1b6a79686
5 changed files with 20 additions and 10 deletions

View File

@@ -146,10 +146,11 @@ void ast_ari_invoke(struct ast_tcptls_session_instance *ser,
* for unit testing.
*
* \param uri Requested URI, relative to the docs path.
* \param prefix prefix that prefixes all http requests
* \param headers HTTP headers.
* \param[out] response RESTful HTTP response.
*/
void ast_ari_get_docs(const char *uri, struct ast_variable *headers, struct ast_ari_response *response);
void ast_ari_get_docs(const char *uri, const char *prefix, struct ast_variable *headers, struct ast_ari_response *response);
/*! \brief Abstraction for reading/writing JSON to a WebSocket */
struct ast_ari_websocket_session;

View File

@@ -101,6 +101,7 @@ struct ast_http_uri {
AST_LIST_ENTRY(ast_http_uri) entry;
const char *description;
const char *uri;
const char *prefix;
ast_http_callback callback;
unsigned int has_subtree:1;
/*! Structure is malloc'd */