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 %% types
t(T) -> t(Type) -> hoconsc:t(Type).
fun (type) -> T; (_) -> undefined end.
t(T, M, D) -> t(Type, Mapping, Default) ->
fun (type) -> T; (mapping) -> M; (default) -> D; (_) -> undefined end. hoconsc:t(Type, #{mapping => Mapping, default => Default}).
t(T, M, D, O) -> t(Type, Mapping, Default, OverrideEnv) ->
fun (type) -> T; hoconsc:t(Type, #{ mapping => Mapping
(mapping) -> M; , default => Default
(default) -> D; , override_env => OverrideEnv
(override_env) -> O; }).
(_) -> undefined end.
ref(Field) -> ref(Field) ->
fun (type) -> Field; (_) -> undefined end. fun (type) -> Field; (_) -> undefined end.

View File

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