fix(hocon): call new schema definition functions

This commit is contained in:
Zaiming Shi 2021-06-13 21:04:33 +02:00
parent 909814a34d
commit bde5d11078
2 changed files with 9 additions and 11 deletions

View File

@ -1180,18 +1180,16 @@ ceiling(X) ->
%% types
t(T) ->
fun (type) -> T; (_) -> undefined end.
t(Type) -> hoconsc:t(Type).
t(T, M, D) ->
fun (type) -> T; (mapping) -> M; (default) -> D; (_) -> undefined end.
t(Type, Mapping, Default) ->
hoconsc:t(Type, #{mapping => Mapping, default => Default}).
t(T, M, D, O) ->
fun (type) -> T;
(mapping) -> M;
(default) -> D;
(override_env) -> O;
(_) -> undefined end.
t(Type, Mapping, Default, OverrideEnv) ->
hoconsc:t(Type, #{ mapping => Mapping
, default => Default
, override_env => OverrideEnv
}).
ref(Field) ->
fun (type) -> Field; (_) -> undefined end.

View File

@ -7,7 +7,7 @@
{mapping, "dashboard.default_user.password", "emqx_dashboard.default_user_passwd", [
{datatype, string},
{override_env, "ADMIN_PASSWORD"}
{override_env, "EMQX_ADMIN_PASSWORD"}
]}.
{mapping, "dashboard.listener.http.port", "emqx_dashboard.listeners", [