fix: add namespace to schema
This commit is contained in:
parent
a27caff5af
commit
7d9403d056
|
@ -102,7 +102,7 @@
|
|||
|
||||
-elvis([{elvis_style, god_modules, disable}]).
|
||||
|
||||
namespace() -> undefined.
|
||||
namespace() -> broker.
|
||||
|
||||
roots() ->
|
||||
%% TODO change config importance to a field metadata
|
||||
|
@ -2219,7 +2219,7 @@ authentication(Desc) ->
|
|||
undefined -> Default;
|
||||
Module -> hoconsc:lazy(Module:root_type())
|
||||
end,
|
||||
desc_id => authentication_0,
|
||||
desc_id => "authentication_0",
|
||||
desc => iolist_to_binary([
|
||||
Desc,
|
||||
"\nAuthentication can be one single authenticator instance or a chain of "
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
, emqx_slow_subs_schema
|
||||
]).
|
||||
|
||||
namespace() -> undefined.
|
||||
namespace() -> cluster.
|
||||
|
||||
roots() ->
|
||||
PtKey = ?EMQX_AUTHENTICATION_SCHEMA_MODULE_PT_KEY,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
-import(hoconsc, [mk/2, ref/2]).
|
||||
|
||||
-export([roots/0, fields/1, desc/1]).
|
||||
-export([namespace/0, roots/0, fields/1, desc/1]).
|
||||
|
||||
-export([ get_response/0
|
||||
, put_request/0
|
||||
|
@ -51,6 +51,8 @@ http_schema(Method) ->
|
|||
%%======================================================================================
|
||||
%% Hocon Schema Definitions
|
||||
|
||||
namespace() -> connector.
|
||||
|
||||
roots() -> ["connectors"].
|
||||
|
||||
fields(connectors) -> fields("connectors");
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
-behaviour(hocon_schema).
|
||||
|
||||
-export([ roots/0
|
||||
-export([ namespace/0
|
||||
, roots/0
|
||||
, fields/1
|
||||
, desc/1
|
||||
]).
|
||||
|
@ -34,6 +35,8 @@
|
|||
|
||||
-import(emqx_schema, [mk_duration/2]).
|
||||
|
||||
namespace() -> "connector-mqtt".
|
||||
|
||||
roots() ->
|
||||
fields("config").
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
desc/1
|
||||
]).
|
||||
|
||||
namespace() -> <<"dashboard">>.
|
||||
namespace() -> dashboard.
|
||||
roots() -> ["dashboard"].
|
||||
|
||||
fields("dashboard") ->
|
||||
|
|
|
@ -22,12 +22,15 @@
|
|||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
-export([
|
||||
namespace/0,
|
||||
roots/0,
|
||||
fields/1
|
||||
]).
|
||||
|
||||
-import(emqx_schema, [sc/2]).
|
||||
|
||||
namespace() -> "authn-psk".
|
||||
|
||||
roots() -> ["psk_authentication"].
|
||||
|
||||
fields("psk_authentication") ->
|
||||
|
|
Loading…
Reference in New Issue