Merge pull request #11088 from fix/EMQX-10068/nicer-doc-tags
fix(ft-api): make schema tags look nicer in the docs
This commit is contained in:
commit
af7b7ebf7c
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
|
-include("emqx_ft_api.hrl").
|
||||||
|
|
||||||
%% Swagger specs from hocon schema
|
%% Swagger specs from hocon schema
|
||||||
-export([
|
-export([
|
||||||
|
@ -61,7 +62,7 @@ schema("/file_transfer/files") ->
|
||||||
#{
|
#{
|
||||||
'operationId' => '/file_transfer/files',
|
'operationId' => '/file_transfer/files',
|
||||||
get => #{
|
get => #{
|
||||||
tags => [<<"file_transfer">>],
|
tags => ?TAGS,
|
||||||
summary => <<"List all uploaded files">>,
|
summary => <<"List all uploaded files">>,
|
||||||
description => ?DESC("file_list"),
|
description => ?DESC("file_list"),
|
||||||
parameters => [
|
parameters => [
|
||||||
|
@ -83,7 +84,7 @@ schema("/file_transfer/files/:clientid/:fileid") ->
|
||||||
#{
|
#{
|
||||||
'operationId' => '/file_transfer/files/:clientid/:fileid',
|
'operationId' => '/file_transfer/files/:clientid/:fileid',
|
||||||
get => #{
|
get => #{
|
||||||
tags => [<<"file_transfer">>],
|
tags => ?TAGS,
|
||||||
summary => <<"List files uploaded in a specific transfer">>,
|
summary => <<"List files uploaded in a specific transfer">>,
|
||||||
description => ?DESC("file_list_transfer"),
|
description => ?DESC("file_list_transfer"),
|
||||||
parameters => [
|
parameters => [
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
|
-ifndef(__EMQX_FT_API__).
|
||||||
|
-define(__EMQX_FT_API__, 42).
|
||||||
|
|
||||||
|
-define(TAGS, [<<"File Transfer">>]).
|
||||||
|
|
||||||
|
-endif.
|
|
@ -21,6 +21,7 @@
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
|
-include("emqx_ft_api.hrl").
|
||||||
|
|
||||||
%% Swagger specs from hocon schema
|
%% Swagger specs from hocon schema
|
||||||
-export([
|
-export([
|
||||||
|
@ -60,7 +61,7 @@ schema("/file_transfer/file") ->
|
||||||
#{
|
#{
|
||||||
'operationId' => '/file_transfer/file',
|
'operationId' => '/file_transfer/file',
|
||||||
get => #{
|
get => #{
|
||||||
tags => [<<"file_transfer">>],
|
tags => ?TAGS,
|
||||||
summary => <<"Download a particular file">>,
|
summary => <<"Download a particular file">>,
|
||||||
description => ?DESC("file_get"),
|
description => ?DESC("file_get"),
|
||||||
parameters => [
|
parameters => [
|
||||||
|
|
Loading…
Reference in New Issue