chore: add more example for clients api
This commit is contained in:
parent
93cbb5ebd8
commit
30b67add05
|
@ -213,9 +213,9 @@ schema("/clients/kickout/bulk") ->
|
|||
post => #{
|
||||
description => ?DESC(kickout_clients),
|
||||
tags => ?TAGS,
|
||||
'requestBody' => hoconsc:mk(
|
||||
'requestBody' => emqx_dashboard_swagger:schema_with_example(
|
||||
hoconsc:array(binary()),
|
||||
#{desc => <<"The list of Client IDs that need to be kicked out">>}
|
||||
["emqx_clienid_985bb09d", "emqx_clientid_211cc01c"]
|
||||
),
|
||||
responses => #{
|
||||
204 => <<"Kick out clients successfully">>
|
||||
|
@ -547,10 +547,14 @@ fields(client) ->
|
|||
];
|
||||
fields(authz_cache) ->
|
||||
[
|
||||
{access, hoconsc:mk(binary(), #{desc => <<"Access type">>})},
|
||||
{result, hoconsc:mk(binary(), #{desc => <<"Allow or deny">>})},
|
||||
{topic, hoconsc:mk(binary(), #{desc => <<"Topic name">>})},
|
||||
{updated_time, hoconsc:mk(integer(), #{desc => <<"Update time">>})}
|
||||
{access, hoconsc:mk(binary(), #{desc => <<"Access type">>, example => <<"publish">>})},
|
||||
{result,
|
||||
hoconsc:mk(hoconsc:enum([allow, denny]), #{
|
||||
desc => <<"Allow or deny">>, example => <<"allow">>
|
||||
})},
|
||||
{topic, hoconsc:mk(binary(), #{desc => <<"Topic name">>, example => <<"testtopic/1">>})},
|
||||
{updated_time,
|
||||
hoconsc:mk(integer(), #{desc => <<"Update time">>, example => 1687850712989})}
|
||||
];
|
||||
fields(keepalive) ->
|
||||
[
|
||||
|
@ -559,7 +563,10 @@ fields(keepalive) ->
|
|||
];
|
||||
fields(subscribe) ->
|
||||
[
|
||||
{topic, hoconsc:mk(binary(), #{required => true, desc => <<"Topic">>})},
|
||||
{topic,
|
||||
hoconsc:mk(binary(), #{
|
||||
required => true, desc => <<"Topic">>, example => <<"testtopic/#">>
|
||||
})},
|
||||
{qos, hoconsc:mk(emqx_schema:qos(), #{default => 0, desc => <<"QoS">>})},
|
||||
{nl, hoconsc:mk(integer(), #{default => 0, desc => <<"No Local">>})},
|
||||
{rap, hoconsc:mk(integer(), #{default => 0, desc => <<"Retain as Published">>})},
|
||||
|
@ -567,7 +574,7 @@ fields(subscribe) ->
|
|||
];
|
||||
fields(unsubscribe) ->
|
||||
[
|
||||
{topic, hoconsc:mk(binary(), #{desc => <<"Topic">>})}
|
||||
{topic, hoconsc:mk(binary(), #{desc => <<"Topic">>, example => <<"testtopic/#">>})}
|
||||
].
|
||||
|
||||
%%%==============================================================================================
|
||||
|
|
|
@ -74,13 +74,16 @@ schema("/subscriptions") ->
|
|||
|
||||
fields(subscription) ->
|
||||
[
|
||||
{node, hoconsc:mk(binary(), #{desc => <<"Access type">>})},
|
||||
{topic, hoconsc:mk(binary(), #{desc => <<"Topic name">>})},
|
||||
{clientid, hoconsc:mk(binary(), #{desc => <<"Client identifier">>})},
|
||||
{qos, hoconsc:mk(emqx_schema:qos(), #{desc => <<"QoS">>})},
|
||||
{nl, hoconsc:mk(integer(), #{desc => <<"No Local">>})},
|
||||
{rap, hoconsc:mk(integer(), #{desc => <<"Retain as Published">>})},
|
||||
{rh, hoconsc:mk(integer(), #{desc => <<"Retain Handling">>})}
|
||||
{node, hoconsc:mk(binary(), #{desc => <<"Access type">>, example => <<"emqx@127.0.0.1">>})},
|
||||
{topic, hoconsc:mk(binary(), #{desc => <<"Topic name">>, example => <<"testtopic/1">>})},
|
||||
{clientid,
|
||||
hoconsc:mk(binary(), #{
|
||||
desc => <<"Client identifier">>, example => <<"emqx_clientid_xx128cdhfc">>
|
||||
})},
|
||||
{qos, hoconsc:mk(emqx_schema:qos(), #{desc => <<"QoS">>, example => 0})},
|
||||
{nl, hoconsc:mk(integer(), #{desc => <<"No Local">>, example => 0})},
|
||||
{rap, hoconsc:mk(integer(), #{desc => <<"Retain as Published">>, example => 0})},
|
||||
{rh, hoconsc:mk(integer(), #{desc => <<"Retain Handling">>, example => 0})}
|
||||
].
|
||||
|
||||
parameters() ->
|
||||
|
|
Loading…
Reference in New Issue