chore: make sure swagger's tags always titlecase 2
This commit is contained in:
parent
cc63479e69
commit
a3296078c3
|
@ -33,8 +33,8 @@
|
|||
|
||||
% Swagger
|
||||
|
||||
-define(API_TAGS_GLOBAL, [<<"authentication">>]).
|
||||
-define(API_TAGS_SINGLE, [<<"listener authentication">>]).
|
||||
-define(API_TAGS_GLOBAL, [<<"Authentication">>]).
|
||||
-define(API_TAGS_SINGLE, [<<"Listener authentication">>]).
|
||||
|
||||
-export([
|
||||
api_spec/0,
|
||||
|
|
|
@ -29,15 +29,8 @@
|
|||
-define(NOT_FOUND, 'NOT_FOUND').
|
||||
|
||||
% Swagger
|
||||
|
||||
-define(API_TAGS_GLOBAL, [
|
||||
?EMQX_AUTHENTICATION_CONFIG_ROOT_NAME_BINARY,
|
||||
<<"authentication">>
|
||||
]).
|
||||
-define(API_TAGS_SINGLE, [
|
||||
?EMQX_AUTHENTICATION_CONFIG_ROOT_NAME_BINARY,
|
||||
<<"listener authentication">>
|
||||
]).
|
||||
-define(API_TAGS_GLOBAL, [<<"authentication">>]).
|
||||
-define(API_TAGS_SINGLE, [<<"listener authentication">>]).
|
||||
|
||||
-export([
|
||||
api_spec/0,
|
||||
|
|
|
@ -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()), #{
|
||||
|
|
|
@ -37,7 +37,7 @@ schema("/monitor") ->
|
|||
#{
|
||||
'operationId' => monitor,
|
||||
get => #{
|
||||
tags => [<<"metrics">>],
|
||||
tags => [<<"Metrics">>],
|
||||
desc => <<"List monitor data.">>,
|
||||
parameters => [parameter_latest()],
|
||||
responses => #{
|
||||
|
@ -50,7 +50,7 @@ schema("/monitor/nodes/:node") ->
|
|||
#{
|
||||
'operationId' => monitor,
|
||||
get => #{
|
||||
tags => [<<"metrics">>],
|
||||
tags => [<<"Metrics">>],
|
||||
desc => <<"List the monitor data on the node.">>,
|
||||
parameters => [parameter_node(), parameter_latest()],
|
||||
responses => #{
|
||||
|
@ -63,7 +63,7 @@ schema("/monitor_current") ->
|
|||
#{
|
||||
'operationId' => monitor_current,
|
||||
get => #{
|
||||
tags => [<<"metrics">>],
|
||||
tags => [<<"Metrics">>],
|
||||
desc => <<"Current status. Gauge and rate.">>,
|
||||
responses => #{
|
||||
200 => hoconsc:mk(hoconsc:ref(sampler_current), #{})
|
||||
|
@ -74,7 +74,7 @@ schema("/monitor_current/nodes/:node") ->
|
|||
#{
|
||||
'operationId' => monitor_current,
|
||||
get => #{
|
||||
tags => [<<"metrics">>],
|
||||
tags => [<<"Metrics">>],
|
||||
desc => <<"Node current status. Gauge and rate.">>,
|
||||
parameters => [parameter_node()],
|
||||
responses => #{
|
||||
|
|
|
@ -48,7 +48,7 @@ schema(?PREFIX ++ "/request") ->
|
|||
#{
|
||||
operationId => request,
|
||||
post => #{
|
||||
tags => [<<"coap">>],
|
||||
tags => [<<"CoAP gateway">>],
|
||||
desc => ?DESC(send_coap_request),
|
||||
parameters => request_parameters(),
|
||||
requestBody => request_body(),
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
-export([alarms/2]).
|
||||
|
||||
-define(TAGS, [<<"alarms">>]).
|
||||
-define(TAGS, [<<"Alarms">>]).
|
||||
|
||||
%% internal export (for query)
|
||||
-export([query/4]).
|
||||
|
|
|
@ -50,7 +50,7 @@ schema("/stats") ->
|
|||
get =>
|
||||
#{
|
||||
description => <<"EMQX stats">>,
|
||||
tags => [<<"metrics">>],
|
||||
tags => [<<"Metrics">>],
|
||||
parameters => [ref(aggregate)],
|
||||
responses =>
|
||||
#{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
-export([sys/2]).
|
||||
|
||||
-define(TAGS, [<<"system topics">>]).
|
||||
-define(TAGS, [<<"System topics">>]).
|
||||
|
||||
namespace() -> "sys".
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
]).
|
||||
|
||||
-define(SCHEMA_MODULE, emqx_prometheus_schema).
|
||||
-define(TAGS, [<<"monitor">>]).
|
||||
-define(TAGS, [<<"Monitor">>]).
|
||||
|
||||
api_spec() ->
|
||||
emqx_dashboard_swagger:spec(?MODULE, #{check_schema => true}).
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
schema/1
|
||||
]).
|
||||
|
||||
-define(API_TAG_STATSD, [<<"monitor">>]).
|
||||
-define(API_TAG_STATSD, [<<"Monitor">>]).
|
||||
-define(SCHEMA_MODULE, emqx_statsd_schema).
|
||||
|
||||
-define(INTERNAL_ERROR, 'INTERNAL_ERROR').
|
||||
|
|
Loading…
Reference in New Issue