Merge pull request #8753 from zhongwencool/swagger-tag-titlecase

chore: swagger tag titlecase
This commit is contained in:
zhongwencool 2022-08-18 11:46:04 +08:00 committed by GitHub
commit 3906819dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 18 deletions

View File

@ -3,7 +3,7 @@
{erl_opts, [debug_info]}. {erl_opts, [debug_info]}.
{deps, {deps,
[ [
{minirest, {git, "https://github.com/emqx/minirest.git", {tag, "1.3.6"}}} {minirest, {git, "https://github.com/emqx/minirest.git", {tag, "1.3.7"}}}
]}. ]}.
{shell, [ {shell, [

View File

@ -48,7 +48,7 @@ schema(?PREFIX ++ "/request") ->
#{ #{
operationId => request, operationId => request,
post => #{ post => #{
tags => [<<"CoAP gateway">>], tags => [<<"CoAP">>],
desc => ?DESC(send_coap_request), desc => ?DESC(send_coap_request),
parameters => request_parameters(), parameters => request_parameters(),
requestBody => request_body(), requestBody => request_body(),

View File

@ -43,7 +43,7 @@ schema(?PATH("/lookup")) ->
#{ #{
'operationId' => lookup, 'operationId' => lookup,
get => #{ get => #{
tags => [<<"lwm2m">>], tags => [<<"LwM2M">>],
desc => ?DESC(lookup_resource), desc => ?DESC(lookup_resource),
parameters => [ parameters => [
{clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})}, {clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})},
@ -67,7 +67,7 @@ schema(?PATH("/observe")) ->
#{ #{
'operationId' => observe, 'operationId' => observe,
post => #{ post => #{
tags => [<<"lwm2m">>], tags => [<<"LwM2M">>],
desc => ?DESC(observe_resource), desc => ?DESC(observe_resource),
parameters => [ parameters => [
{clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})}, {clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})},
@ -85,7 +85,7 @@ schema(?PATH("/read")) ->
#{ #{
'operationId' => read, 'operationId' => read,
post => #{ post => #{
tags => [<<"lwm2m">>], tags => [<<"LwM2M">>],
desc => ?DESC(read_resource), desc => ?DESC(read_resource),
parameters => [ parameters => [
{clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})}, {clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})},
@ -102,7 +102,7 @@ schema(?PATH("/write")) ->
'operationId' => write, 'operationId' => write,
post => #{ post => #{
desc => ?DESC(write_resource), desc => ?DESC(write_resource),
tags => [<<"lwm2m">>], tags => [<<"LwM2M">>],
parameters => [ parameters => [
{clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})}, {clientid, mk(binary(), #{in => path, example => "urn:oma:lwm2m:oma:2"})},
{path, mk(binary(), #{in => query, required => true, example => "/3/0/7"})}, {path, mk(binary(), #{in => query, required => true, example => "/3/0/7"})},

View File

@ -37,6 +37,7 @@
-define(PREFIX_RESET, "/configs_reset/"). -define(PREFIX_RESET, "/configs_reset/").
-define(ERR_MSG(MSG), list_to_binary(io_lib:format("~p", [MSG]))). -define(ERR_MSG(MSG), list_to_binary(io_lib:format("~p", [MSG]))).
-define(OPTS, #{rawconf_with_defaults => true, override_to => cluster}). -define(OPTS, #{rawconf_with_defaults => true, override_to => cluster}).
-define(TAGS, ["Configs"]).
-define(EXCLUDES, -define(EXCLUDES,
[ [
@ -85,7 +86,7 @@ schema("/configs") ->
#{ #{
'operationId' => configs, 'operationId' => configs,
get => #{ get => #{
tags => [conf], tags => ?TAGS,
description => description =>
<<"Get all the configurations of the specified node, including hot and non-hot updatable items.">>, <<"Get all the configurations of the specified node, including hot and non-hot updatable items.">>,
parameters => [ parameters => [
@ -111,7 +112,7 @@ schema("/configs_reset/:rootname") ->
#{ #{
'operationId' => config_reset, 'operationId' => config_reset,
post => #{ post => #{
tags => [conf], tags => ?TAGS,
description => description =>
<< <<
"Reset the config entry specified by the query string parameter `conf_path`.</br>\n" "Reset the config entry specified by the query string parameter `conf_path`.</br>\n"
@ -149,12 +150,12 @@ schema("/configs/global_zone") ->
#{ #{
'operationId' => global_zone_configs, 'operationId' => global_zone_configs,
get => #{ get => #{
tags => [conf], tags => ?TAGS,
description => <<"Get the global zone configs">>, description => <<"Get the global zone configs">>,
responses => #{200 => Schema} responses => #{200 => Schema}
}, },
put => #{ put => #{
tags => [conf], tags => ?TAGS,
description => <<"Update globbal zone configs">>, description => <<"Update globbal zone configs">>,
'requestBody' => Schema, 'requestBody' => Schema,
responses => #{ responses => #{
@ -180,7 +181,7 @@ schema("/configs/global_zone") ->
%% #{ %% #{
%% 'operationId' => config, %% 'operationId' => config,
%% get => #{ %% get => #{
%% tags => [conf], %% tags => ?TAGS,
%% description => <<"Get config of this limiter">>, %% description => <<"Get config of this limiter">>,
%% parameters => Parameters, %% parameters => Parameters,
%% responses => #{ %% responses => #{
@ -189,7 +190,7 @@ schema("/configs/global_zone") ->
%% } %% }
%% }, %% },
%% put => #{ %% put => #{
%% tags => [conf], %% tags => ?TAGS,
%% description => <<"Update config of this limiter">>, %% description => <<"Update config of this limiter">>,
%% parameters => Parameters, %% parameters => Parameters,
%% 'requestBody' => Schema, %% 'requestBody' => Schema,
@ -204,7 +205,7 @@ schema(Path) ->
#{ #{
'operationId' => config, 'operationId' => config,
get => #{ get => #{
tags => [conf], tags => ?TAGS,
description => iolist_to_binary([ description => iolist_to_binary([
<<"Get the sub-configurations under *">>, <<"Get the sub-configurations under *">>,
RootKey, RootKey,
@ -216,7 +217,7 @@ schema(Path) ->
} }
}, },
put => #{ put => #{
tags => [conf], tags => ?TAGS,
description => iolist_to_binary([ description => iolist_to_binary([
<<"Update the sub-configurations under *">>, <<"Update the sub-configurations under *">>,
RootKey, RootKey,

View File

@ -20,5 +20,5 @@
%% Interval for reporting telemetry data, Default: 7d %% Interval for reporting telemetry data, Default: 7d
-define(REPORT_INTERVAL, 604800). -define(REPORT_INTERVAL, 604800).
-define(API_TAG_MQTT, [<<"mqtt">>]). -define(API_TAG_MQTT, [<<"MQTT">>]).
-define(API_SCHEMA_MODULE, emqx_modules_schema). -define(API_SCHEMA_MODULE, emqx_modules_schema).

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*- %% -*- mode: erlang -*-
{application, emqx_modules, [ {application, emqx_modules, [
{description, "EMQX Modules"}, {description, "EMQX Modules"},
{vsn, "5.0.2"}, {vsn, "5.0.3"},
{modules, []}, {modules, []},
{applications, [kernel, stdlib, emqx]}, {applications, [kernel, stdlib, emqx]},
{mod, {emqx_modules_app, []}}, {mod, {emqx_modules_app, []}},

View File

@ -55,7 +55,7 @@ defmodule EMQXUmbrella.MixProject do
{:ekka, github: "emqx/ekka", tag: "0.13.4", override: true}, {:ekka, github: "emqx/ekka", tag: "0.13.4", override: true},
{:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.1", override: true}, {:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.1", override: true},
{:grpc, github: "emqx/grpc-erl", tag: "0.6.6", override: true}, {:grpc, github: "emqx/grpc-erl", tag: "0.6.6", override: true},
{:minirest, github: "emqx/minirest", tag: "1.3.6", override: true}, {:minirest, github: "emqx/minirest", tag: "1.3.7", override: true},
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"}, {:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
{:replayq, "0.3.4", override: true}, {:replayq, "0.3.4", override: true},
{:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true}, {:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true},

View File

@ -57,7 +57,7 @@
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.13.4"}}} , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.13.4"}}}
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}} , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}}
, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.6"}}} , {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.6"}}}
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.6"}}} , {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.7"}}}
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}} , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}}
, {replayq, "0.3.4"} , {replayq, "0.3.4"}
, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}} , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}