Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2020-01-08 12:24:51 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2020-01-08 12:24:51 +0300
commit97da380acd8e3ba0c9a9618a99c4106eca1d1576 (patch)
treecc2b8fb7e175afcaf182a3595735f6f9177ec3dc /src/mod_http_api.erl
parentc40d8fe11b4842795fdeab408b0a61e208071d21 (diff)
Generate ejabberd.yml.5 man page from source code directly
Several documentation callbacks (doc/0 and mod_doc/0) are implemented and `ejabberdctl man` command is added to generate a man page. Note that the command requires a2x to be installed (which is a part of asciidoc package).
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r--src/mod_http_api.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl
index 34e118cc9..8890a3dd6 100644
--- a/src/mod_http_api.erl
+++ b/src/mod_http_api.erl
@@ -30,12 +30,13 @@
-behaviour(gen_mod).
-export([start/2, stop/1, reload/3, process/2, depends/2,
- mod_options/1]).
+ mod_options/1, mod_doc/0]).
-include("xmpp.hrl").
-include("logger.hrl").
-include("ejabberd_http.hrl").
-include("ejabberd_stacktrace.hrl").
+-include("translate.hrl").
-define(DEFAULT_API_VERSION, 0).
@@ -520,3 +521,8 @@ hide_sensitive_args(NonListArgs) ->
mod_options(_) ->
[].
+
+mod_doc() ->
+ #{desc =>
+ ?T("This module provides a ReST API to call "
+ "ejabberd commands using JSON data.")}.