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

This commit is contained in:
JimMoen 2022-01-25 15:40:04 +08:00
parent d3381710cd
commit 4e9e95c317
3 changed files with 5 additions and 5 deletions

View File

@ -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}.

View File

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

View File

@ -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}}
}
}.