fix(connector): some desc for connector APIs

This commit is contained in:
Shawn 2021-12-18 09:52:15 +08:00
parent b2e7a6a249
commit 20091f8d2a
2 changed files with 6 additions and 6 deletions

View File

@ -48,10 +48,10 @@ common_bridge_fields() ->
, {connector,
mk(binary(),
#{ nullable => false
, example => <<"mqtt:my_mqtt_connector">>
, desc =>"""
The connector name to be used for this bridge.
Connectors are configured as 'connectors.{type}.{name}',
for example 'connectors.http.mybridge'.
The connector Id to be used for this bridge. Connector Ids must be of format: '{type}:{name}'.<br>
In config files, you can find the corresponding config entry for a connector by such path: 'connectors.{type}.{name}'.<br>
"""
})}
].

View File

@ -38,9 +38,9 @@
_ = ConnName,
EXPR
catch
error:{invalid_bridge_id, Id0} ->
{400, #{code => 'INVALID_ID', message => <<"invalid_bridge_id: ", Id0/binary,
". Bridge Ids must be of format {type}:{name}">>}}
error:{invalid_connector_id, Id0} ->
{400, #{code => 'INVALID_ID', message => <<"invalid_connector_id: ", Id0/binary,
". Connector Ids must be of format {type}:{name}">>}}
end).
namespace() -> "connector".