Jelajahi Sumber

fix(swagger): spec remove needless description, fix property name

JimMoen 4 tahun lalu
induk
melakukan
4e9e95c317

+ 2 - 0
apps/emqx_management/src/emqx_mgmt_api_nodes.erl

@@ -100,6 +100,7 @@ node_metrics_api() ->
             parameters => parameters(),
             responses => #{
                 <<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']),
+                %% TODO: Node Metrics Schema
                 <<"200">> => schema(metrics, <<"Get EMQ X Node Metrics">>)}}},
     {"/nodes/:node_name/metrics", Metadata, node_metrics}.
 
@@ -110,6 +111,7 @@ node_stats_api() ->
             parameters => parameters(),
             responses => #{
                 <<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']),
+                %% TODO: Node Stats Schema
                 <<"200">> => schema(stat, <<"Get EMQ X Node Stats">>)}}},
     {"/nodes/:node_name/stats", Metadata, node_stats}.
 

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

@@ -37,7 +37,7 @@ schema("/status") ->
             , security => []
             , responses =>
                   #{200 =>
-                        #{ desc => <<"Node is running">>
+                        #{ description => <<"Node is running">>
                          , content =>
                               #{ 'text/plain' =>
                                      #{ schema => #{type => string}

+ 2 - 4
apps/emqx_prometheus/src/emqx_prometheus_api.erl

@@ -116,10 +116,8 @@ prometheus_data_schema() ->
     #{ description => <<"Get Prometheus Data">>
      , content =>
            #{ 'application/json' =>
-                  #{ schema => #{type => object}
-                   , description => <<"Prometheus Data in json">>}
+                  #{schema => #{type => object}}
             , 'text/plain' =>
-                  #{ schema => #{type => string}
-                   , description => <<"Prometheus Data in text/plain">>}
+                  #{schema => #{type => string}}
             }
      }.