test(schema): delete stale reference to emqx_schema:file() type
This commit is contained in:
parent
2fda91ec59
commit
65efa2672e
|
@ -47,7 +47,6 @@
|
||||||
-type bytesize() :: integer().
|
-type bytesize() :: integer().
|
||||||
-type wordsize() :: bytesize().
|
-type wordsize() :: bytesize().
|
||||||
-type percent() :: float().
|
-type percent() :: float().
|
||||||
-type file() :: string().
|
|
||||||
-type comma_separated_list() :: list(string()).
|
-type comma_separated_list() :: list(string()).
|
||||||
-type comma_separated_binary() :: [binary()].
|
-type comma_separated_binary() :: [binary()].
|
||||||
-type comma_separated_atoms() :: [atom()].
|
-type comma_separated_atoms() :: [atom()].
|
||||||
|
@ -151,7 +150,6 @@
|
||||||
bytesize/0,
|
bytesize/0,
|
||||||
wordsize/0,
|
wordsize/0,
|
||||||
percent/0,
|
percent/0,
|
||||||
file/0,
|
|
||||||
comma_separated_list/0,
|
comma_separated_list/0,
|
||||||
comma_separated_binary/0,
|
comma_separated_binary/0,
|
||||||
ip_port/0,
|
ip_port/0,
|
||||||
|
|
|
@ -337,8 +337,6 @@ typename_to_spec("timeout_duration_ms()", _Mod) ->
|
||||||
#{type => duration};
|
#{type => duration};
|
||||||
typename_to_spec("percent()", _Mod) ->
|
typename_to_spec("percent()", _Mod) ->
|
||||||
#{type => percent};
|
#{type => percent};
|
||||||
typename_to_spec("file()", _Mod) ->
|
|
||||||
#{type => string};
|
|
||||||
typename_to_spec("ip_port()", _Mod) ->
|
typename_to_spec("ip_port()", _Mod) ->
|
||||||
#{type => ip_port};
|
#{type => ip_port};
|
||||||
typename_to_spec("url()", _Mod) ->
|
typename_to_spec("url()", _Mod) ->
|
||||||
|
|
|
@ -816,7 +816,7 @@ to_schema(Body) ->
|
||||||
fields(good_ref) ->
|
fields(good_ref) ->
|
||||||
[
|
[
|
||||||
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},
|
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},
|
||||||
{log_dir, mk(emqx_schema:file(), #{example => "var/log/emqx"})},
|
{log_dir, mk(string(), #{example => "var/log/emqx"})},
|
||||||
{tag, mk(binary(), #{desc => <<"tag">>})}
|
{tag, mk(binary(), #{desc => <<"tag">>})}
|
||||||
];
|
];
|
||||||
fields(nest_ref) ->
|
fields(nest_ref) ->
|
||||||
|
|
|
@ -344,10 +344,9 @@ t_complex_type(_Config) ->
|
||||||
enum := [random, hash], type := string
|
enum := [random, hash], type := string
|
||||||
}},
|
}},
|
||||||
{<<"timeout">>, #{
|
{<<"timeout">>, #{
|
||||||
example := infinity,
|
|
||||||
<<"oneOf">> := [
|
<<"oneOf">> := [
|
||||||
#{example := infinity, type := string},
|
#{example := _, type := string},
|
||||||
#{type := integer}
|
#{enum := [infinity], type := string}
|
||||||
]
|
]
|
||||||
}},
|
}},
|
||||||
{<<"bytesize">>, #{
|
{<<"bytesize">>, #{
|
||||||
|
@ -653,7 +652,8 @@ schema("/ref/complex_type") ->
|
||||||
{server, hoconsc:mk(emqx_schema:ip_port(), #{})},
|
{server, hoconsc:mk(emqx_schema:ip_port(), #{})},
|
||||||
{connect_timeout, hoconsc:mk(emqx_schema:timeout_duration(), #{})},
|
{connect_timeout, hoconsc:mk(emqx_schema:timeout_duration(), #{})},
|
||||||
{pool_type, hoconsc:mk(hoconsc:enum([random, hash]), #{})},
|
{pool_type, hoconsc:mk(hoconsc:enum([random, hash]), #{})},
|
||||||
{timeout, hoconsc:mk(timeout(), #{})},
|
{timeout,
|
||||||
|
hoconsc:mk(hoconsc:union([infinity, emqx_schema:timeout_duration()]), #{})},
|
||||||
{bytesize, hoconsc:mk(emqx_schema:bytesize(), #{})},
|
{bytesize, hoconsc:mk(emqx_schema:bytesize(), #{})},
|
||||||
{wordsize, hoconsc:mk(emqx_schema:wordsize(), #{})},
|
{wordsize, hoconsc:mk(emqx_schema:wordsize(), #{})},
|
||||||
{maps, hoconsc:mk(map(), #{})},
|
{maps, hoconsc:mk(map(), #{})},
|
||||||
|
@ -687,7 +687,7 @@ to_schema(Object) ->
|
||||||
fields(good_ref) ->
|
fields(good_ref) ->
|
||||||
[
|
[
|
||||||
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},
|
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},
|
||||||
{log_dir, mk(emqx_schema:file(), #{example => "var/log/emqx"})},
|
{log_dir, mk(string(), #{example => "var/log/emqx"})},
|
||||||
{tag, mk(binary(), #{desc => <<"tag">>})}
|
{tag, mk(binary(), #{desc => <<"tag">>})}
|
||||||
];
|
];
|
||||||
fields(nest_ref) ->
|
fields(nest_ref) ->
|
||||||
|
|
Loading…
Reference in New Issue