Merge pull request #10385 from zhongwencool/hide-conf

feat: hide data items from configuration files and documentation.
This commit is contained in:
zhongwencool 2023-04-14 09:38:34 +08:00 committed by GitHub
commit 626e814e9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View File

@ -163,7 +163,7 @@ roots(high) ->
{?EMQX_AUTHORIZATION_CONFIG_ROOT_NAME, {?EMQX_AUTHORIZATION_CONFIG_ROOT_NAME,
sc( sc(
ref(?EMQX_AUTHORIZATION_CONFIG_ROOT_NAME), ref(?EMQX_AUTHORIZATION_CONFIG_ROOT_NAME),
#{} #{importance => ?IMPORTANCE_HIDDEN}
)} )}
]; ];
roots(medium) -> roots(medium) ->
@ -2762,7 +2762,11 @@ authentication(Which) ->
Module -> Module ->
Module:root_type() Module:root_type()
end, end,
hoconsc:mk(Type, #{desc => Desc, converter => fun ensure_array/2}). hoconsc:mk(Type, #{
desc => Desc,
converter => fun ensure_array/2,
importance => ?IMPORTANCE_HIDDEN
}).
%% the older version schema allows individual element (instead of a chain) in config %% the older version schema allows individual element (instead of a chain) in config
ensure_array(undefined, _) -> undefined; ensure_array(undefined, _) -> undefined;

View File

@ -137,7 +137,7 @@ namespace() -> "bridge".
tags() -> tags() ->
[<<"Bridge">>]. [<<"Bridge">>].
roots() -> [bridges]. roots() -> [{bridges, ?HOCON(?R_REF(bridges), #{importance => ?IMPORTANCE_HIDDEN})}].
fields(bridges) -> fields(bridges) ->
[ [

View File

@ -1278,7 +1278,10 @@ emqx_schema_high_prio_roots() ->
{"authorization", {"authorization",
sc( sc(
?R_REF("authorization"), ?R_REF("authorization"),
#{desc => ?DESC(authorization)} #{
desc => ?DESC(authorization),
importance => ?IMPORTANCE_HIDDEN
}
)}, )},
lists:keyreplace("authorization", 1, Roots, Authz). lists:keyreplace("authorization", 1, Roots, Authz).

View File

@ -38,7 +38,7 @@ namespace() -> rule_engine.
tags() -> tags() ->
[<<"Rule Engine">>]. [<<"Rule Engine">>].
roots() -> ["rule_engine"]. roots() -> [{"rule_engine", ?HOCON(?R_REF("rule_engine"), #{importance => ?IMPORTANCE_HIDDEN})}].
fields("rule_engine") -> fields("rule_engine") ->
rule_engine_settings() ++ rule_engine_settings() ++

View File

@ -0,0 +1 @@
Hide data items(rule_engine/bridge/authz/authn) from configuration files and documentation.