chore(gw): fix bad argument type
This commit is contained in:
parent
0eff5358ca
commit
a937a3d4dc
|
@ -201,7 +201,7 @@ schema("/gateway/:name/stats") ->
|
|||
|
||||
params_gateway_name_in_path() ->
|
||||
[{name,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ in => path
|
||||
, desc => <<"Gateway Name">>
|
||||
})}
|
||||
|
@ -209,7 +209,7 @@ params_gateway_name_in_path() ->
|
|||
|
||||
params_gateway_status_in_qs() ->
|
||||
[{status,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ in => query
|
||||
, nullable => true
|
||||
, desc => <<"Gateway Status">>
|
||||
|
@ -226,20 +226,20 @@ roots() ->
|
|||
|
||||
fields(gateway_overview) ->
|
||||
[ {name,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Gateway Name">>})}
|
||||
, {status,
|
||||
mk(hoconsc:enum([running, stopped, unloaded]),
|
||||
#{ desc => <<"The Gateway status">>})}
|
||||
, {created_at,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{desc => <<"The Gateway created datetime">>})}
|
||||
, {started_at,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ nullable => true
|
||||
, desc => <<"The Gateway started datetime">>})}
|
||||
, {stopped_at,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ nullable => true
|
||||
, desc => <<"The Gateway stopped datetime">>})}
|
||||
, {max_connections,
|
||||
|
@ -256,7 +256,7 @@ fields(gateway_overview) ->
|
|||
];
|
||||
fields(gateway_listener_overview) ->
|
||||
[ {id,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Listener ID">>})}
|
||||
, {running,
|
||||
mk(boolean(),
|
||||
|
@ -277,14 +277,14 @@ fields(Listener) when Listener == tcp_listener;
|
|||
Listener == udp_listener;
|
||||
Listener == dtls_listener ->
|
||||
[ {id,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ nullable => true
|
||||
, desc => <<"Listener ID">>})}
|
||||
, {type,
|
||||
mk(hoconsc:union([tcp, ssl, udp, dtls]),
|
||||
#{ desc => <<"Listener type">>})}
|
||||
, {name,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Listener Name">>})}
|
||||
, {running,
|
||||
mk(boolean(),
|
||||
|
@ -293,7 +293,7 @@ fields(Listener) when Listener == tcp_listener;
|
|||
] ++ emqx_gateway_schema:fields(Listener);
|
||||
|
||||
fields(gateway_stats) ->
|
||||
[{key, mk(string(), #{})}].
|
||||
[{key, mk(binary(), #{})}].
|
||||
|
||||
schema_gateways_conf() ->
|
||||
%% XXX: We need convert the emqx_gateway_schema's listener map
|
||||
|
|
|
@ -593,7 +593,7 @@ roots() ->
|
|||
].
|
||||
|
||||
fields(test) ->
|
||||
[{key, mk(string(), #{ desc => <<"Desc">>})}];
|
||||
[{key, mk(binary(), #{ desc => <<"Desc">>})}];
|
||||
|
||||
fields(stomp_client) ->
|
||||
common_client_props();
|
||||
|
@ -603,7 +603,7 @@ fields(coap_client) ->
|
|||
common_client_props();
|
||||
fields(lwm2m_client) ->
|
||||
[ {endpoint_name,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"The LwM2M client endpoint name">>})}
|
||||
, {lifetime,
|
||||
mk(integer(),
|
||||
|
@ -614,7 +614,7 @@ fields(exproto_client) ->
|
|||
|
||||
fields(subscription) ->
|
||||
[ {topic,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Topic Fillter">>})}
|
||||
, {qos,
|
||||
mk(integer(),
|
||||
|
@ -634,30 +634,30 @@ fields(subscription) ->
|
|||
];
|
||||
fields(extra_sub_props) ->
|
||||
[ {subid,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Only stomp protocol, an uniquely identity for "
|
||||
"the subscription. range: 1-65535.">>})}
|
||||
].
|
||||
|
||||
common_client_props() ->
|
||||
[ {node,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Name of the node to which the client is "
|
||||
"connected">>})}
|
||||
, {clientid,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Client identifier">>})}
|
||||
, {username,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Username of client when connecting">>})}
|
||||
, {proto_name,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Client protocol name">>})}
|
||||
, {proto_ver,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Protocol version used by the client">>})}
|
||||
, {ip_address,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Client's IP address">>})}
|
||||
, {port,
|
||||
mk(integer(),
|
||||
|
@ -667,10 +667,10 @@ common_client_props() ->
|
|||
#{ desc => <<"Indicates whether the client is connected via "
|
||||
"bridge">>})}
|
||||
, {connected_at,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Client connection time">>})}
|
||||
, {disconnected_at,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Client offline time, This field is only valid and "
|
||||
"returned when connected is false">>})}
|
||||
, {connected,
|
||||
|
@ -681,10 +681,10 @@ common_client_props() ->
|
|||
%% want it
|
||||
%%
|
||||
%, {will_msg,
|
||||
% mk(string(),
|
||||
% mk(binary(),
|
||||
% #{ desc => <<"Client will message">>})}
|
||||
%, {zone,
|
||||
% mk(string(),
|
||||
% mk(binary(),
|
||||
% #{ desc => <<"Indicate the configuration group used by the "
|
||||
% "client">>})}
|
||||
, {keepalive,
|
||||
|
@ -699,7 +699,7 @@ common_client_props() ->
|
|||
#{ desc => <<"Session expiration interval, with the unit of "
|
||||
"second">>})}
|
||||
, {created_at,
|
||||
mk(string(),
|
||||
mk(binary(),
|
||||
#{ desc => <<"Session creation time">>})}
|
||||
, {subscriptions_cnt,
|
||||
mk(integer(),
|
||||
|
|
Loading…
Reference in New Issue