Просмотр исходного кода

chore(swagger): caption tags name

JianBo He 3 лет назад
Родитель
Сommit
a84c6f938c

+ 1 - 1
apps/emqx_authn/src/emqx_authn_api.erl

@@ -34,7 +34,7 @@
 % Swagger
 
 -define(API_TAGS_GLOBAL, [<<"Authentication">>]).
--define(API_TAGS_SINGLE, [<<"Listener authentication">>]).
+-define(API_TAGS_SINGLE, [<<"Listener Authentication">>]).
 
 -export([
     api_spec/0,

+ 2 - 2
apps/emqx_auto_subscribe/src/emqx_auto_subscribe_api.erl

@@ -44,14 +44,14 @@ schema("/mqtt/auto_subscribe") ->
         'operationId' => auto_subscribe,
         get => #{
             description => ?DESC(list_auto_subscribe_api),
-            tags => [<<"Auto subscribe">>],
+            tags => [<<"Auto Subscribe">>],
             responses => #{
                 200 => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe")
             }
         },
         put => #{
             description => ?DESC(update_auto_subscribe_api),
-            tags => [<<"Auto subscribe">>],
+            tags => [<<"Auto Subscribe">>],
             'requestBody' => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe"),
             responses => #{
                 200 => hoconsc:ref(emqx_auto_subscribe_schema, "auto_subscribe"),

+ 2 - 2
apps/emqx_dashboard/src/emqx_dashboard_error_code_api.erl

@@ -51,7 +51,7 @@ schema("/error_codes") ->
         get => #{
             security => [],
             description => <<"API Error Codes">>,
-            tags => [<<"Error codes">>],
+            tags => [<<"Error Codes">>],
             responses => #{
                 200 => hoconsc:array(hoconsc:ref(?MODULE, error_code))
             }
@@ -63,7 +63,7 @@ schema("/error_codes/:code") ->
         get => #{
             security => [],
             description => <<"API Error Codes">>,
-            tags => [<<"Error codes">>],
+            tags => [<<"Error Codes">>],
             parameters => [
                 {code,
                     hoconsc:mk(hoconsc:enum(emqx_dashboard_error_code:all()), #{

+ 1 - 1
apps/emqx_exhook/src/emqx_exhook_api.erl

@@ -41,7 +41,7 @@
 -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]).
 
--define(TAGS, [<<"exhooks">>]).
+-define(TAGS, [<<"ExHook">>]).
 -define(NOT_FOURD, 'NOT_FOUND').
 -define(BAD_REQUEST, 'BAD_REQUEST').
 -define(BAD_RPC, 'BAD_RPC').

+ 9 - 9
apps/emqx_gateway/src/emqx_gateway_api_authn.erl

@@ -182,7 +182,7 @@ schema("/gateways/:name/authentication") ->
         'operationId' => authn,
         get =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(get_authn),
                 summary => <<"Get Authenticator Configuration">>,
                 parameters => params_gateway_name_in_path(),
@@ -196,7 +196,7 @@ schema("/gateways/:name/authentication") ->
             },
         put =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(update_authn),
                 summary => <<"Update Authenticator Configuration">>,
                 parameters => params_gateway_name_in_path(),
@@ -206,7 +206,7 @@ schema("/gateways/:name/authentication") ->
             },
         post =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(add_authn),
                 summary => <<"Create an Authenticator for a Gateway">>,
                 parameters => params_gateway_name_in_path(),
@@ -216,7 +216,7 @@ schema("/gateways/:name/authentication") ->
             },
         delete =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(delete_authn),
                 summary => <<"Delete the Gateway Authenticator">>,
                 parameters => params_gateway_name_in_path(),
@@ -229,7 +229,7 @@ schema("/gateways/:name/authentication/users") ->
         'operationId' => users,
         get =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(list_users),
                 summary => <<"List users for a Gateway Authenticator">>,
                 parameters => params_gateway_name_in_path() ++
@@ -247,7 +247,7 @@ schema("/gateways/:name/authentication/users") ->
             },
         post =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(add_user),
                 summary => <<"Add User for a Gateway Authenticator">>,
                 parameters => params_gateway_name_in_path(),
@@ -271,7 +271,7 @@ schema("/gateways/:name/authentication/users/:uid") ->
         'operationId' => users_insta,
         get =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(get_user),
                 summary => <<"Get User Info for a Gateway Authenticator">>,
                 parameters => params_gateway_name_in_path() ++
@@ -288,7 +288,7 @@ schema("/gateways/:name/authentication/users/:uid") ->
             },
         put =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(update_user),
                 summary => <<"Update User Info for a Gateway Authenticator">>,
                 parameters => params_gateway_name_in_path() ++
@@ -309,7 +309,7 @@ schema("/gateways/:name/authentication/users/:uid") ->
             },
         delete =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(delete_user),
                 summary => <<"Delete User for a Gateway Authenticator">>,
                 parameters => params_gateway_name_in_path() ++

+ 6 - 6
apps/emqx_gateway/src/emqx_gateway_api_clients.erl

@@ -467,7 +467,7 @@ schema("/gateways/:name/clients") ->
         'operationId' => clients,
         get =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(list_clients),
                 summary => <<"List Gateway's Clients">>,
                 parameters => params_client_query(),
@@ -480,7 +480,7 @@ schema("/gateways/:name/clients/:clientid") ->
         'operationId' => clients_insta,
         get =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(get_client),
                 summary => <<"Get Client Info">>,
                 parameters => params_client_insta(),
@@ -489,7 +489,7 @@ schema("/gateways/:name/clients/:clientid") ->
             },
         delete =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(kick_client),
                 summary => <<"Kick out Client">>,
                 parameters => params_client_insta(),
@@ -502,7 +502,7 @@ schema("/gateways/:name/clients/:clientid/subscriptions") ->
         'operationId' => subscriptions,
         get =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(list_subscriptions),
                 summary => <<"List Client's Subscription">>,
                 parameters => params_client_insta(),
@@ -518,7 +518,7 @@ schema("/gateways/:name/clients/:clientid/subscriptions") ->
             },
         post =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(add_subscription),
                 summary => <<"Add Subscription for Client">>,
                 parameters => params_client_insta(),
@@ -542,7 +542,7 @@ schema("/gateways/:name/clients/:clientid/subscriptions/:topic") ->
         'operationId' => subscriptions,
         delete =>
             #{
-                tag => [<<"Gateways">>],
+                tags => [<<"Gateways">>],
                 desc => ?DESC(delete_subscription),
                 summary => <<"Delete Client's Subscription">>,
                 parameters => params_topic_name_in_path() ++ params_client_insta(),

+ 1 - 1
apps/emqx_management/src/emqx_mgmt_api_app.erl

@@ -22,7 +22,7 @@
 -export([api_spec/0, fields/1, paths/0, schema/1, namespace/0]).
 -export([api_key/2, api_key_by_name/2]).
 -export([validate_name/1]).
--define(TAGS, [<<"API keys">>]).
+-define(TAGS, [<<"API Keys">>]).
 
 namespace() -> "api_key".
 

+ 1 - 1
apps/emqx_management/src/emqx_mgmt_api_sys.erl

@@ -31,7 +31,7 @@
 
 -export([sys/2]).
 
--define(TAGS, [<<"System topics">>]).
+-define(TAGS, [<<"System Topics">>]).
 
 namespace() -> "sys".
 

+ 1 - 1
apps/emqx_slow_subs/src/emqx_slow_subs_api.erl

@@ -25,7 +25,7 @@
 -export([api_spec/0, paths/0, schema/1, fields/1, namespace/0]).
 
 -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(emqx_mgmt_util, [bad_request/0]).