Merge pull request #11731 from zmstone/1008-expose-file-transfer-host-conf
fix(api-docs): add file-transfer config to hot-config scope
This commit is contained in:
commit
55618dd28a
|
@ -203,14 +203,30 @@ gen_config_md(Dir, SchemaModule, Lang) ->
|
||||||
-spec schema_module() -> module().
|
-spec schema_module() -> module().
|
||||||
schema_module() ->
|
schema_module() ->
|
||||||
case os:getenv("SCHEMA_MOD") of
|
case os:getenv("SCHEMA_MOD") of
|
||||||
false -> emqx_conf_schema;
|
false ->
|
||||||
Value -> list_to_existing_atom(Value)
|
resolve_schema_module();
|
||||||
|
Value ->
|
||||||
|
list_to_existing_atom(Value)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Internal functions
|
%% Internal functions
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
|
-ifdef(TEST).
|
||||||
|
resolve_schema_module() ->
|
||||||
|
case os:getenv("PROFILE") of
|
||||||
|
"emqx" ->
|
||||||
|
emqx_conf_schema;
|
||||||
|
"emqx-enterprise" ->
|
||||||
|
emqx_enterprise_schema
|
||||||
|
end.
|
||||||
|
-else.
|
||||||
|
-spec resolve_schema_module() -> no_return().
|
||||||
|
resolve_schema_module() ->
|
||||||
|
error("SCHEMA_MOD environment variable is not set").
|
||||||
|
-endif.
|
||||||
|
|
||||||
%% @doc Make a resolver function that can be used to lookup the description by hocon_schema_json dump.
|
%% @doc Make a resolver function that can be used to lookup the description by hocon_schema_json dump.
|
||||||
make_desc_resolver(Lang) ->
|
make_desc_resolver(Lang) ->
|
||||||
fun
|
fun
|
||||||
|
|
|
@ -38,12 +38,21 @@
|
||||||
-define(OPTS, #{rawconf_with_defaults => true, override_to => cluster}).
|
-define(OPTS, #{rawconf_with_defaults => true, override_to => cluster}).
|
||||||
-define(TAGS, ["Configs"]).
|
-define(TAGS, ["Configs"]).
|
||||||
|
|
||||||
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
|
-define(ROOT_KEYS_EE, [
|
||||||
|
<<"file_transfer">>
|
||||||
|
]).
|
||||||
|
-else.
|
||||||
|
-define(ROOT_KEYS_EE, []).
|
||||||
|
-endif.
|
||||||
|
|
||||||
-define(ROOT_KEYS, [
|
-define(ROOT_KEYS, [
|
||||||
<<"dashboard">>,
|
<<"dashboard">>,
|
||||||
<<"alarm">>,
|
<<"alarm">>,
|
||||||
<<"sys_topics">>,
|
<<"sys_topics">>,
|
||||||
<<"sysmon">>,
|
<<"sysmon">>,
|
||||||
<<"log">>
|
<<"log">>
|
||||||
|
| ?ROOT_KEYS_EE
|
||||||
]).
|
]).
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Add file_transfer feature configs to hot-config schema.
|
Loading…
Reference in New Issue