refactor: HTTP bridge into the emqx_bridge_http app
Fixes: https://emqx.atlassian.net/browse/EMQX-9568
This commit is contained in:
parent
f28510b3ad
commit
6ce47614d2
|
@ -53,7 +53,7 @@ api_schema(Method) ->
|
||||||
Broker = [
|
Broker = [
|
||||||
{Type, ref(Mod, Method)}
|
{Type, ref(Mod, Method)}
|
||||||
|| {Type, Mod} <- [
|
|| {Type, Mod} <- [
|
||||||
{<<"webhook">>, emqx_bridge_webhook_schema},
|
{<<"webhook">>, emqx_bridge_http_schema},
|
||||||
{<<"mqtt">>, emqx_bridge_mqtt_schema}
|
{<<"mqtt">>, emqx_bridge_mqtt_schema}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -158,7 +158,7 @@ fields(bridges) ->
|
||||||
[
|
[
|
||||||
{webhook,
|
{webhook,
|
||||||
mk(
|
mk(
|
||||||
hoconsc:map(name, ref(emqx_bridge_webhook_schema, "config")),
|
hoconsc:map(name, ref(emqx_bridge_http_schema, "config")),
|
||||||
#{
|
#{
|
||||||
desc => ?DESC("bridges_webhook"),
|
desc => ?DESC("bridges_webhook"),
|
||||||
required => false,
|
required => false,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
%% See the License for the specific language governing permissions and
|
%% See the License for the specific language governing permissions and
|
||||||
%% limitations under the License.
|
%% limitations under the License.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_bridge_webhook_schema).
|
-module(emqx_bridge_http_schema).
|
||||||
|
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
|
@ -13,7 +13,7 @@
|
||||||
%% limitations under the License.
|
%% limitations under the License.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-module(emqx_bridge_webhook_SUITE).
|
-module(emqx_bridge_http_SUITE).
|
||||||
|
|
||||||
%% This suite should contains testcases that are specific for the webhook
|
%% This suite should contains testcases that are specific for the webhook
|
||||||
%% bridge. There are also some test cases that implicitly tests the webhook
|
%% bridge. There are also some test cases that implicitly tests the webhook
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_bridge_webhook_schema {
|
emqx_bridge_http_schema {
|
||||||
|
|
||||||
config_body.desc:
|
config_body.desc:
|
||||||
"""The body of the HTTP request.<br/>
|
"""The body of the HTTP request.<br/>
|
Loading…
Reference in New Issue