fix(ft-api): make schema tags look nicer in the docs

This commit is contained in:
Andrew Mayorov 2023-06-19 13:25:06 +02:00
parent 1f1d61cef6
commit ae5846be29
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
3 changed files with 15 additions and 3 deletions

View File

@ -19,6 +19,7 @@
-include_lib("typerefl/include/types.hrl").
-include_lib("hocon/include/hoconsc.hrl").
-include("emqx_ft_api.hrl").
%% Swagger specs from hocon schema
-export([
@ -61,7 +62,7 @@ schema("/file_transfer/files") ->
#{
'operationId' => '/file_transfer/files',
get => #{
tags => [<<"file_transfer">>],
tags => ?TAGS,
summary => <<"List all uploaded files">>,
description => ?DESC("file_list"),
parameters => [
@ -83,7 +84,7 @@ schema("/file_transfer/files/:clientid/:fileid") ->
#{
'operationId' => '/file_transfer/files/:clientid/:fileid',
get => #{
tags => [<<"file_transfer">>],
tags => ?TAGS,
summary => <<"List files uploaded in a specific transfer">>,
description => ?DESC("file_list_transfer"),
parameters => [

View File

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

View File

@ -21,6 +21,7 @@
-include_lib("typerefl/include/types.hrl").
-include_lib("hocon/include/hoconsc.hrl").
-include_lib("emqx/include/logger.hrl").
-include("emqx_ft_api.hrl").
%% Swagger specs from hocon schema
-export([
@ -60,7 +61,7 @@ schema("/file_transfer/file") ->
#{
'operationId' => '/file_transfer/file',
get => #{
tags => [<<"file_transfer">>],
tags => ?TAGS,
summary => <<"Download a particular file">>,
description => ?DESC("file_get"),
parameters => [