fix(elvis): elvis warning
This commit is contained in:
parent
cf11f3f8ee
commit
0614c157ec
|
@ -126,7 +126,8 @@ EMQ X can be configured with:
|
|||
<br>
|
||||
<ul>
|
||||
<li><code>[]</code>: The default value, it allows *ALL* logins</li>
|
||||
<li>one: For example <code>{enable:true,backend:\"built-in-database\",mechanism=\"password-based\"}</code></li>
|
||||
<li>one: For example <code>{enable:true,backend:\"built-in-database\",mechanism=\"password-based\"}
|
||||
</code></li>
|
||||
<li>chain: An array of structs.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
@ -1479,7 +1480,8 @@ authentication(Desc) ->
|
|||
%% the type checks are done in emqx_auth application when it boots.
|
||||
%% and in emqx_authentication_config module for rutime changes.
|
||||
Default = hoconsc:lazy(hoconsc:union([typerefl:map(), hoconsc:array(typerefl:map())])),
|
||||
%% as the type is lazy, the runtime module injection from EMQX_AUTHENTICATION_SCHEMA_MODULE_PT_KEY
|
||||
%% as the type is lazy, the runtime module injection
|
||||
%% from EMQX_AUTHENTICATION_SCHEMA_MODULE_PT_KEY
|
||||
%% is for now only affecting document generation.
|
||||
%% maybe in the future, we can find a more straightforward way to support
|
||||
%% * document generation (at compile time)
|
||||
|
|
|
@ -45,8 +45,8 @@ start_listeners() ->
|
|||
components => #{
|
||||
schemas => #{},
|
||||
'securitySchemes' => #{
|
||||
basicAuth => #{type => http, scheme => basic},
|
||||
bearerAuth => #{type => http, scheme => bearer}
|
||||
'basicAuth' => #{type => http, scheme => basic},
|
||||
'bearerAuth' => #{type => http, scheme => bearer}
|
||||
}}},
|
||||
Dispatch =
|
||||
case os:getenv("_EMQX_ENABLE_DASHBOARD") of
|
||||
|
@ -62,7 +62,7 @@ start_listeners() ->
|
|||
base_path => ?BASE_PATH,
|
||||
modules => minirest_api:find_api_modules(apps()),
|
||||
authorization => Authorization,
|
||||
security => [#{basicAuth => []}, #{bearerAuth => []}],
|
||||
security => [#{'basicAuth' => []}, #{'bearerAuth' => []}],
|
||||
swagger_global_spec => GlobalSpec,
|
||||
dispatch => Dispatch,
|
||||
middlewares => [cowboy_router, ?EMQX_MIDDLE, cowboy_handler]
|
||||
|
|
|
@ -123,7 +123,8 @@ schema("/users/:username") ->
|
|||
#{in => path, example => <<"admin">>})}],
|
||||
'requestBody' => [
|
||||
{ description
|
||||
, mk(emqx_schema:unicode_binary(), #{desc => <<"User description">>, example => <<"administrator">>})}
|
||||
, mk(emqx_schema:unicode_binary(),
|
||||
#{desc => <<"User description">>, example => <<"administrator">>})}
|
||||
],
|
||||
responses => #{
|
||||
200 => mk( ref(?MODULE, user)
|
||||
|
|
|
@ -131,7 +131,7 @@ delete(Keys, Fields) ->
|
|||
lists:foldl(fun(Key, Acc) -> lists:keydelete(Key, 1, Acc) end, Fields, Keys).
|
||||
|
||||
api_key(get, _) ->
|
||||
{200, [format(App) ||App <- emqx_mgmt_auth:list()]};
|
||||
{200, [format(App) || App <- emqx_mgmt_auth:list()]};
|
||||
api_key(post, #{body := App}) ->
|
||||
#{
|
||||
<<"name">> := Name,
|
||||
|
|
Loading…
Reference in New Issue