chore(swagger): caption tags name
This commit is contained in:
parent
d17c473dc2
commit
a84c6f938c
|
@ -34,7 +34,7 @@
|
||||||
% Swagger
|
% Swagger
|
||||||
|
|
||||||
-define(API_TAGS_GLOBAL, [<<"Authentication">>]).
|
-define(API_TAGS_GLOBAL, [<<"Authentication">>]).
|
||||||
-define(API_TAGS_SINGLE, [<<"Listener authentication">>]).
|
-define(API_TAGS_SINGLE, [<<"Listener Authentication">>]).
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
api_spec/0,
|
api_spec/0,
|
||||||
|
|
|
@ -44,14 +44,14 @@ schema("/mqtt/auto_subscribe") ->
|
||||||
'operationId' => auto_subscribe,
|
'operationId' => auto_subscribe,
|
||||||
get => #{
|
get => #{
|
||||||
description => ?DESC(list_auto_subscribe_api),
|
description => ?DESC(list_auto_subscribe_api),
|
||||||
tags => [<<"Auto subscribe">>],
|
tags => [<<"Auto Subscribe">>],
|
||||||
responses => #{
|
responses => #{
|
||||||
200 => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe")
|
200 => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
put => #{
|
put => #{
|
||||||
description => ?DESC(update_auto_subscribe_api),
|
description => ?DESC(update_auto_subscribe_api),
|
||||||
tags => [<<"Auto subscribe">>],
|
tags => [<<"Auto Subscribe">>],
|
||||||
'requestBody' => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe"),
|
'requestBody' => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe"),
|
||||||
responses => #{
|
responses => #{
|
||||||
200 => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe"),
|
200 => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe"),
|
||||||
|
|
|
@ -51,7 +51,7 @@ schema("/error_codes") ->
|
||||||
get => #{
|
get => #{
|
||||||
security => [],
|
security => [],
|
||||||
description => <<"API Error Codes">>,
|
description => <<"API Error Codes">>,
|
||||||
tags => [<<"Error codes">>],
|
tags => [<<"Error Codes">>],
|
||||||
responses => #{
|
responses => #{
|
||||||
200 => hoconsc:array(hoconsc:ref(?MODULE, error_code))
|
200 => hoconsc:array(hoconsc:ref(?MODULE, error_code))
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ schema("/error_codes/:code") ->
|
||||||
get => #{
|
get => #{
|
||||||
security => [],
|
security => [],
|
||||||
description => <<"API Error Codes">>,
|
description => <<"API Error Codes">>,
|
||||||
tags => [<<"Error codes">>],
|
tags => [<<"Error Codes">>],
|
||||||
parameters => [
|
parameters => [
|
||||||
{code,
|
{code,
|
||||||
hoconsc:mk(hoconsc:enum(emqx_dashboard_error_code:all()), #{
|
hoconsc:mk(hoconsc:enum(emqx_dashboard_error_code:all()), #{
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
-import(hoconsc, [mk/1, mk/2, ref/1, enum/1, array/1, map/2]).
|
-import(hoconsc, [mk/1, mk/2, ref/1, enum/1, array/1, map/2]).
|
||||||
-import(emqx_dashboard_swagger, [schema_with_example/2, error_codes/2]).
|
-import(emqx_dashboard_swagger, [schema_with_example/2, error_codes/2]).
|
||||||
|
|
||||||
-define(TAGS, [<<"exhooks">>]).
|
-define(TAGS, [<<"ExHook">>]).
|
||||||
-define(NOT_FOURD, 'NOT_FOUND').
|
-define(NOT_FOURD, 'NOT_FOUND').
|
||||||
-define(BAD_REQUEST, 'BAD_REQUEST').
|
-define(BAD_REQUEST, 'BAD_REQUEST').
|
||||||
-define(BAD_RPC, 'BAD_RPC').
|
-define(BAD_RPC, 'BAD_RPC').
|
||||||
|
|
|
@ -182,7 +182,7 @@ schema("/gateways/:name/authentication") ->
|
||||||
'operationId' => authn,
|
'operationId' => authn,
|
||||||
get =>
|
get =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(get_authn),
|
desc => ?DESC(get_authn),
|
||||||
summary => <<"Get Authenticator Configuration">>,
|
summary => <<"Get Authenticator Configuration">>,
|
||||||
parameters => params_gateway_name_in_path(),
|
parameters => params_gateway_name_in_path(),
|
||||||
|
@ -196,7 +196,7 @@ schema("/gateways/:name/authentication") ->
|
||||||
},
|
},
|
||||||
put =>
|
put =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(update_authn),
|
desc => ?DESC(update_authn),
|
||||||
summary => <<"Update Authenticator Configuration">>,
|
summary => <<"Update Authenticator Configuration">>,
|
||||||
parameters => params_gateway_name_in_path(),
|
parameters => params_gateway_name_in_path(),
|
||||||
|
@ -206,7 +206,7 @@ schema("/gateways/:name/authentication") ->
|
||||||
},
|
},
|
||||||
post =>
|
post =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(add_authn),
|
desc => ?DESC(add_authn),
|
||||||
summary => <<"Create an Authenticator for a Gateway">>,
|
summary => <<"Create an Authenticator for a Gateway">>,
|
||||||
parameters => params_gateway_name_in_path(),
|
parameters => params_gateway_name_in_path(),
|
||||||
|
@ -216,7 +216,7 @@ schema("/gateways/:name/authentication") ->
|
||||||
},
|
},
|
||||||
delete =>
|
delete =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(delete_authn),
|
desc => ?DESC(delete_authn),
|
||||||
summary => <<"Delete the Gateway Authenticator">>,
|
summary => <<"Delete the Gateway Authenticator">>,
|
||||||
parameters => params_gateway_name_in_path(),
|
parameters => params_gateway_name_in_path(),
|
||||||
|
@ -229,7 +229,7 @@ schema("/gateways/:name/authentication/users") ->
|
||||||
'operationId' => users,
|
'operationId' => users,
|
||||||
get =>
|
get =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(list_users),
|
desc => ?DESC(list_users),
|
||||||
summary => <<"List users for a Gateway Authenticator">>,
|
summary => <<"List users for a Gateway Authenticator">>,
|
||||||
parameters => params_gateway_name_in_path() ++
|
parameters => params_gateway_name_in_path() ++
|
||||||
|
@ -247,7 +247,7 @@ schema("/gateways/:name/authentication/users") ->
|
||||||
},
|
},
|
||||||
post =>
|
post =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(add_user),
|
desc => ?DESC(add_user),
|
||||||
summary => <<"Add User for a Gateway Authenticator">>,
|
summary => <<"Add User for a Gateway Authenticator">>,
|
||||||
parameters => params_gateway_name_in_path(),
|
parameters => params_gateway_name_in_path(),
|
||||||
|
@ -271,7 +271,7 @@ schema("/gateways/:name/authentication/users/:uid") ->
|
||||||
'operationId' => users_insta,
|
'operationId' => users_insta,
|
||||||
get =>
|
get =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(get_user),
|
desc => ?DESC(get_user),
|
||||||
summary => <<"Get User Info for a Gateway Authenticator">>,
|
summary => <<"Get User Info for a Gateway Authenticator">>,
|
||||||
parameters => params_gateway_name_in_path() ++
|
parameters => params_gateway_name_in_path() ++
|
||||||
|
@ -288,7 +288,7 @@ schema("/gateways/:name/authentication/users/:uid") ->
|
||||||
},
|
},
|
||||||
put =>
|
put =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(update_user),
|
desc => ?DESC(update_user),
|
||||||
summary => <<"Update User Info for a Gateway Authenticator">>,
|
summary => <<"Update User Info for a Gateway Authenticator">>,
|
||||||
parameters => params_gateway_name_in_path() ++
|
parameters => params_gateway_name_in_path() ++
|
||||||
|
@ -309,7 +309,7 @@ schema("/gateways/:name/authentication/users/:uid") ->
|
||||||
},
|
},
|
||||||
delete =>
|
delete =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(delete_user),
|
desc => ?DESC(delete_user),
|
||||||
summary => <<"Delete User for a Gateway Authenticator">>,
|
summary => <<"Delete User for a Gateway Authenticator">>,
|
||||||
parameters => params_gateway_name_in_path() ++
|
parameters => params_gateway_name_in_path() ++
|
||||||
|
|
|
@ -467,7 +467,7 @@ schema("/gateways/:name/clients") ->
|
||||||
'operationId' => clients,
|
'operationId' => clients,
|
||||||
get =>
|
get =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(list_clients),
|
desc => ?DESC(list_clients),
|
||||||
summary => <<"List Gateway's Clients">>,
|
summary => <<"List Gateway's Clients">>,
|
||||||
parameters => params_client_query(),
|
parameters => params_client_query(),
|
||||||
|
@ -480,7 +480,7 @@ schema("/gateways/:name/clients/:clientid") ->
|
||||||
'operationId' => clients_insta,
|
'operationId' => clients_insta,
|
||||||
get =>
|
get =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(get_client),
|
desc => ?DESC(get_client),
|
||||||
summary => <<"Get Client Info">>,
|
summary => <<"Get Client Info">>,
|
||||||
parameters => params_client_insta(),
|
parameters => params_client_insta(),
|
||||||
|
@ -489,7 +489,7 @@ schema("/gateways/:name/clients/:clientid") ->
|
||||||
},
|
},
|
||||||
delete =>
|
delete =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(kick_client),
|
desc => ?DESC(kick_client),
|
||||||
summary => <<"Kick out Client">>,
|
summary => <<"Kick out Client">>,
|
||||||
parameters => params_client_insta(),
|
parameters => params_client_insta(),
|
||||||
|
@ -502,7 +502,7 @@ schema("/gateways/:name/clients/:clientid/subscriptions") ->
|
||||||
'operationId' => subscriptions,
|
'operationId' => subscriptions,
|
||||||
get =>
|
get =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(list_subscriptions),
|
desc => ?DESC(list_subscriptions),
|
||||||
summary => <<"List Client's Subscription">>,
|
summary => <<"List Client's Subscription">>,
|
||||||
parameters => params_client_insta(),
|
parameters => params_client_insta(),
|
||||||
|
@ -518,7 +518,7 @@ schema("/gateways/:name/clients/:clientid/subscriptions") ->
|
||||||
},
|
},
|
||||||
post =>
|
post =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(add_subscription),
|
desc => ?DESC(add_subscription),
|
||||||
summary => <<"Add Subscription for Client">>,
|
summary => <<"Add Subscription for Client">>,
|
||||||
parameters => params_client_insta(),
|
parameters => params_client_insta(),
|
||||||
|
@ -542,7 +542,7 @@ schema("/gateways/:name/clients/:clientid/subscriptions/:topic") ->
|
||||||
'operationId' => subscriptions,
|
'operationId' => subscriptions,
|
||||||
delete =>
|
delete =>
|
||||||
#{
|
#{
|
||||||
tag => [<<"Gateways">>],
|
tags => [<<"Gateways">>],
|
||||||
desc => ?DESC(delete_subscription),
|
desc => ?DESC(delete_subscription),
|
||||||
summary => <<"Delete Client's Subscription">>,
|
summary => <<"Delete Client's Subscription">>,
|
||||||
parameters => params_topic_name_in_path() ++ params_client_insta(),
|
parameters => params_topic_name_in_path() ++ params_client_insta(),
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
-export([api_spec/0, fields/1, paths/0, schema/1, namespace/0]).
|
-export([api_spec/0, fields/1, paths/0, schema/1, namespace/0]).
|
||||||
-export([api_key/2, api_key_by_name/2]).
|
-export([api_key/2, api_key_by_name/2]).
|
||||||
-export([validate_name/1]).
|
-export([validate_name/1]).
|
||||||
-define(TAGS, [<<"API keys">>]).
|
-define(TAGS, [<<"API Keys">>]).
|
||||||
|
|
||||||
namespace() -> "api_key".
|
namespace() -> "api_key".
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
-export([sys/2]).
|
-export([sys/2]).
|
||||||
|
|
||||||
-define(TAGS, [<<"System topics">>]).
|
-define(TAGS, [<<"System Topics">>]).
|
||||||
|
|
||||||
namespace() -> "sys".
|
namespace() -> "sys".
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
-export([api_spec/0, paths/0, schema/1, fields/1, namespace/0]).
|
-export([api_spec/0, paths/0, schema/1, fields/1, namespace/0]).
|
||||||
|
|
||||||
-export([slow_subs/2, get_history/0, settings/2]).
|
-export([slow_subs/2, get_history/0, settings/2]).
|
||||||
-define(TAGS, [<<"Slow subscriptions">>]).
|
-define(TAGS, [<<"Slow Subscriptions">>]).
|
||||||
|
|
||||||
-import(hoconsc, [mk/2, ref/1, ref/2]).
|
-import(hoconsc, [mk/2, ref/1, ref/2]).
|
||||||
-import(emqx_mgmt_util, [bad_request/0]).
|
-import(emqx_mgmt_util, [bad_request/0]).
|
||||||
|
|
Loading…
Reference in New Issue