feat(ft): add schema descriptions
This commit is contained in:
parent
bc0a15afd7
commit
c6b3f2c2ca
|
@ -1,6 +1,17 @@
|
||||||
emqx_ft_schema {
|
emqx_ft_schema {
|
||||||
|
|
||||||
local {
|
storage {
|
||||||
|
desc {
|
||||||
|
en: "Storage settings for file transfer."
|
||||||
|
zh: "文件传输的存储设置。"
|
||||||
|
}
|
||||||
|
label: {
|
||||||
|
en: "Storage settings"
|
||||||
|
zh: "存储设置"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
local_type {
|
||||||
desc {
|
desc {
|
||||||
en: "Use local file system to store uploaded files and temporary data."
|
en: "Use local file system to store uploaded files and temporary data."
|
||||||
zh: "使用本地文件系统来存储上传的文件和临时数据。"
|
zh: "使用本地文件系统来存储上传的文件和临时数据。"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
|
|
||||||
-export([namespace/0, roots/0, fields/1, tags/0]).
|
-export([namespace/0, roots/0, fields/1, tags/0, desc/1]).
|
||||||
|
|
||||||
-export([schema/1]).
|
-export([schema/1]).
|
||||||
|
|
||||||
|
@ -49,7 +49,8 @@ fields(file_transfer) ->
|
||||||
{storage, #{
|
{storage, #{
|
||||||
type => hoconsc:union([
|
type => hoconsc:union([
|
||||||
hoconsc:ref(?MODULE, local_storage)
|
hoconsc:ref(?MODULE, local_storage)
|
||||||
])
|
]),
|
||||||
|
desc => ?DESC("storage")
|
||||||
}}
|
}}
|
||||||
];
|
];
|
||||||
fields(local_storage) ->
|
fields(local_storage) ->
|
||||||
|
@ -58,7 +59,7 @@ fields(local_storage) ->
|
||||||
type => local,
|
type => local,
|
||||||
default => local,
|
default => local,
|
||||||
required => false,
|
required => false,
|
||||||
desc => ?DESC("local")
|
desc => ?DESC("local_type")
|
||||||
}},
|
}},
|
||||||
{root, #{
|
{root, #{
|
||||||
type => binary(),
|
type => binary(),
|
||||||
|
@ -67,6 +68,11 @@ fields(local_storage) ->
|
||||||
}}
|
}}
|
||||||
].
|
].
|
||||||
|
|
||||||
|
desc(file_transfer) ->
|
||||||
|
"File transfer settings";
|
||||||
|
desc(local_storage) ->
|
||||||
|
"File transfer local storage settings".
|
||||||
|
|
||||||
schema(filemeta) ->
|
schema(filemeta) ->
|
||||||
#{
|
#{
|
||||||
roots => [
|
roots => [
|
||||||
|
|
Loading…
Reference in New Issue