Explorar o código

Merge pull request #11729 from zhongwencool/api-tags-fix

docs: swagger api tags should camel case
zhongwencool %!s(int64=2) %!d(string=hai) anos
pai
achega
363d073b85

+ 1 - 1
apps/emqx_eviction_agent/src/emqx_eviction_agent.app.src

@@ -1,6 +1,6 @@
 {application, emqx_eviction_agent, [
     {description, "EMQX Eviction Agent"},
-    {vsn, "5.1.3"},
+    {vsn, "5.1.4"},
     {registered, [
         emqx_eviction_agent_sup,
         emqx_eviction_agent,

+ 3 - 1
apps/emqx_eviction_agent/src/emqx_eviction_agent_api.erl

@@ -23,6 +23,8 @@
     roots/0
 ]).
 
+-define(TAGS, [<<"Node Eviction">>]).
+
 %% API callbacks
 -export([
     '/node_eviction/status'/2
@@ -44,7 +46,7 @@ schema("/node_eviction/status") ->
     #{
         'operationId' => '/node_eviction/status',
         get => #{
-            tags => [<<"node_eviction">>],
+            tags => ?TAGS,
             summary => <<"Get node eviction status">>,
             description => ?DESC("node_eviction_status_get"),
             responses => #{

+ 1 - 1
apps/emqx_ft/src/emqx_ft.app.src

@@ -1,6 +1,6 @@
 {application, emqx_ft, [
     {description, "EMQX file transfer over MQTT"},
-    {vsn, "0.1.7"},
+    {vsn, "0.1.8"},
     {registered, []},
     {mod, {emqx_ft_app, []}},
     {applications, [

+ 2 - 2
apps/emqx_ft/src/emqx_ft_api.erl

@@ -110,7 +110,7 @@ schema("/file_transfer") ->
     #{
         'operationId' => '/file_transfer',
         get => #{
-            tags => [<<"file_transfer">>],
+            tags => ?TAGS,
             summary => <<"Get current File Transfer configuration">>,
             description => ?DESC("file_transfer_get_config"),
             responses => #{
@@ -118,7 +118,7 @@ schema("/file_transfer") ->
             }
         },
         put => #{
-            tags => [<<"file_transfer">>],
+            tags => ?TAGS,
             summary => <<"Update File Transfer configuration">>,
             description => ?DESC("file_transfer_update_config"),
             'requestBody' => ?SCHEMA_CONFIG,

+ 1 - 1
apps/emqx_node_rebalance/src/emqx_node_rebalance.app.src

@@ -1,6 +1,6 @@
 {application, emqx_node_rebalance, [
     {description, "EMQX Node Rebalance"},
-    {vsn, "5.0.5"},
+    {vsn, "5.0.6"},
     {registered, [
         emqx_node_rebalance_sup,
         emqx_node_rebalance,

+ 10 - 9
apps/emqx_node_rebalance/src/emqx_node_rebalance_api.erl

@@ -50,6 +50,7 @@
 -define(NODE_EVACUATING, 'NODE_EVACUATING').
 -define(RPC_ERROR, 'RPC_ERROR').
 -define(NOT_FOUND, 'NOT_FOUND').
+-define(TAGS, [<<"Load Rebalance">>]).
 
 %%--------------------------------------------------------------------
 %% API Spec
@@ -78,7 +79,7 @@ schema("/load_rebalance/status") ->
     #{
         'operationId' => '/load_rebalance/status',
         get => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Get rebalance status">>,
             description => ?DESC("load_rebalance_status"),
             responses => #{
@@ -90,7 +91,7 @@ schema("/load_rebalance/global_status") ->
     #{
         'operationId' => '/load_rebalance/global_status',
         get => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Get global rebalance status">>,
             description => ?DESC("load_rebalance_global_status"),
             responses => #{
@@ -102,7 +103,7 @@ schema("/load_rebalance/availability_check") ->
     #{
         'operationId' => '/load_rebalance/availability_check',
         get => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Node rebalance availability check">>,
             description => ?DESC("load_rebalance_availability_check"),
             responses => #{
@@ -115,7 +116,7 @@ schema("/load_rebalance/:node/start") ->
     #{
         'operationId' => '/load_rebalance/:node/start',
         post => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Start rebalancing with the node as coordinator">>,
             description => ?DESC("load_rebalance_start"),
             parameters => [param_node()],
@@ -135,7 +136,7 @@ schema("/load_rebalance/:node/stop") ->
     #{
         'operationId' => '/load_rebalance/:node/stop',
         post => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Stop rebalancing coordinated by the node">>,
             description => ?DESC("load_rebalance_stop"),
             parameters => [param_node()],
@@ -150,7 +151,7 @@ schema("/load_rebalance/:node/evacuation/start") ->
     #{
         'operationId' => '/load_rebalance/:node/evacuation/start',
         post => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Start evacuation on a node">>,
             description => ?DESC("load_rebalance_evacuation_start"),
             parameters => [param_node()],
@@ -170,7 +171,7 @@ schema("/load_rebalance/:node/evacuation/stop") ->
     #{
         'operationId' => '/load_rebalance/:node/evacuation/stop',
         post => #{
-            tags => [<<"load_rebalance">>],
+            tags => ?TAGS,
             summary => <<"Stop evacuation on a node">>,
             description => ?DESC("load_rebalance_evacuation_stop"),
             parameters => [param_node()],
@@ -186,7 +187,7 @@ schema("/load_rebalance/:node/evacuation/stop") ->
 %%     #{
 %%         'operationId' => '/load_rebalance/:node/purge/start',
 %%         post => #{
-%%             tags => [<<"load_rebalance">>],
+%%             tags => ?TAGS,
 %%             summary => <<"Start purge on the whole cluster">>,
 %%             description => ?DESC("cluster_purge_start"),
 %%             parameters => [param_node()],
@@ -206,7 +207,7 @@ schema("/load_rebalance/:node/evacuation/stop") ->
 %%     #{
 %%         'operationId' => '/load_rebalance/:node/purge/stop',
 %%         post => #{
-%%             tags => [<<"load_rebalance">>],
+%%             tags => ?TAGS,
 %%             summary => <<"Stop purge on the whole cluster">>,
 %%             description => ?DESC("cluster_purge_stop"),
 %%             parameters => [param_node()],

+ 1 - 1
apps/emqx_schema_registry/src/emqx_schema_registry.app.src

@@ -1,6 +1,6 @@
 {application, emqx_schema_registry, [
     {description, "EMQX Schema Registry"},
-    {vsn, "0.1.6"},
+    {vsn, "0.1.7"},
     {registered, [emqx_schema_registry_sup]},
     {mod, {emqx_schema_registry_app, []}},
     {included_applications, [

+ 7 - 5
apps/emqx_schema_registry/src/emqx_schema_registry_http_api.erl

@@ -22,6 +22,8 @@
     '/schema_registry/:name'/2
 ]).
 
+-define(TAGS, [<<"Schema Registry">>]).
+
 %%-------------------------------------------------------------------------------------------------
 %% `minirest' and `minirest_trails' API
 %%-------------------------------------------------------------------------------------------------
@@ -41,7 +43,7 @@ schema("/schema_registry") ->
     #{
         'operationId' => '/schema_registry',
         get => #{
-            tags => [<<"schema_registry">>],
+            tags => ?TAGS,
             summary => <<"List registered schemas">>,
             description => ?DESC("desc_schema_registry_api_list"),
             responses =>
@@ -57,7 +59,7 @@ schema("/schema_registry") ->
                 }
         },
         post => #{
-            tags => [<<"schema_registry">>],
+            tags => ?TAGS,
             summary => <<"Register a new schema">>,
             description => ?DESC("desc_schema_registry_api_post"),
             'requestBody' => emqx_dashboard_swagger:schema_with_examples(
@@ -79,7 +81,7 @@ schema("/schema_registry/:name") ->
     #{
         'operationId' => '/schema_registry/:name',
         get => #{
-            tags => [<<"schema_registry">>],
+            tags => ?TAGS,
             summary => <<"Get registered schema">>,
             description => ?DESC("desc_schema_registry_api_get"),
             parameters => [param_path_schema_name()],
@@ -94,7 +96,7 @@ schema("/schema_registry/:name") ->
                 }
         },
         put => #{
-            tags => [<<"schema_registry">>],
+            tags => ?TAGS,
             summary => <<"Update a schema">>,
             description => ?DESC("desc_schema_registry_api_put"),
             parameters => [param_path_schema_name()],
@@ -113,7 +115,7 @@ schema("/schema_registry/:name") ->
                 }
         },
         delete => #{
-            tags => [<<"schema_registry">>],
+            tags => ?TAGS,
             summary => <<"Delete registered schema">>,
             description => ?DESC("desc_schema_registry_api_delete"),
             parameters => [param_path_schema_name()],

+ 1 - 1
lib-ee/emqx_license/src/emqx_license_cli.erl

@@ -41,7 +41,7 @@ license(_) ->
     emqx_ctl:usage(
         [
             {"license info", "Show license info"},
-            {"license update License", "Update license given as a string"}
+            {"license update <License>", "Update license given as a string"}
         ]
     ).