refactor(schema): add namespace/0 to all schema modules
This commit is contained in:
parent
7b59d46854
commit
d603de10e6
|
@ -20,7 +20,7 @@
|
|||
-behaviour(ecpool_worker).
|
||||
|
||||
%% hocon_schema callbacks
|
||||
-export([roots/0, fields/1]).
|
||||
-export([namespace/0, roots/0, fields/1]).
|
||||
|
||||
%% HTTP API callbacks
|
||||
-export([values/1]).
|
||||
|
@ -43,6 +43,8 @@
|
|||
%% Internal callbacks
|
||||
-export([publish_messages/3]).
|
||||
|
||||
namespace() -> "rabbitmq".
|
||||
|
||||
roots() ->
|
||||
[{config, #{type => hoconsc:ref(?MODULE, config)}}].
|
||||
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
|
||||
-behaviour(hocon_schema).
|
||||
|
||||
-export([roots/0, fields/1, validations/0, desc/1, tags/0]).
|
||||
-export([namespace/0, roots/0, fields/1, validations/0, desc/1, tags/0]).
|
||||
|
||||
-export([
|
||||
default_license/0
|
||||
]).
|
||||
|
||||
namespace() -> "license".
|
||||
|
||||
roots() ->
|
||||
[
|
||||
{license,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
-export([check_params/2]).
|
||||
|
||||
-export([roots/0, fields/1]).
|
||||
-export([namespace/0, roots/0, fields/1]).
|
||||
|
||||
-type tag() :: rule_creation | rule_test | rule_engine.
|
||||
|
||||
|
@ -46,6 +46,8 @@ check_params(Params, Tag) ->
|
|||
%%======================================================================================
|
||||
%% Hocon Schema Definitions
|
||||
|
||||
namespace() -> "rule_engine".
|
||||
|
||||
roots() ->
|
||||
[
|
||||
{"rule_engine", sc(ref("rule_engine"), #{desc => ?DESC("root_rule_engine")})},
|
||||
|
|
|
@ -22,11 +22,15 @@
|
|||
-behaviour(hocon_schema).
|
||||
|
||||
-export([
|
||||
namespace/0,
|
||||
roots/0,
|
||||
fields/1,
|
||||
desc/1
|
||||
]).
|
||||
|
||||
%% 'emqxtel' to distinguish open-telemetry
|
||||
namespace() -> "emqxtel".
|
||||
|
||||
roots() -> ["telemetry"].
|
||||
|
||||
fields("telemetry") ->
|
||||
|
|
Loading…
Reference in New Issue