fix: bad code format
This commit is contained in:
parent
17aa81a04f
commit
f5c5e1f96e
|
@ -25,6 +25,13 @@ emqx_mgmt_api_banned {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_banned_api_response_404 {
|
||||||
|
desc {
|
||||||
|
en: """Banned not existed."""
|
||||||
|
zh: """黑名单不存在"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete_banned_api {
|
delete_banned_api {
|
||||||
desc {
|
desc {
|
||||||
en: """Delete banned"""
|
en: """Delete banned"""
|
||||||
|
|
|
@ -68,7 +68,7 @@ fields(alarm) ->
|
||||||
#{desc => ?DESC(node), example => atom_to_list(node())})},
|
#{desc => ?DESC(node), example => atom_to_list(node())})},
|
||||||
{name, hoconsc:mk(binary(),
|
{name, hoconsc:mk(binary(),
|
||||||
#{desc => ?DESC(node), example => <<"high_system_memory_usage">>})},
|
#{desc => ?DESC(node), example => <<"high_system_memory_usage">>})},
|
||||||
{message, hoconsc:mk(binary(), #{desc => desc => ?DESC(message),
|
{message, hoconsc:mk(binary(), #{desc => ?DESC(message),
|
||||||
example => <<"System memory usage is higher than 70%">>})},
|
example => <<"System memory usage is higher than 70%">>})},
|
||||||
{details, hoconsc:mk(map(), #{desc => ?DESC(details),
|
{details, hoconsc:mk(map(), #{desc => ?DESC(details),
|
||||||
example => #{<<"high_watermark">> => 70}})},
|
example => #{<<"high_watermark">> => 70}})},
|
||||||
|
|
|
@ -70,9 +70,7 @@ schema("/banned") ->
|
||||||
200 => [{data, hoconsc:mk(hoconsc:array(hoconsc:ref(ban)), #{})}],
|
200 => [{data, hoconsc:mk(hoconsc:array(hoconsc:ref(ban)), #{})}],
|
||||||
400 => emqx_dashboard_swagger:error_codes(
|
400 => emqx_dashboard_swagger:error_codes(
|
||||||
['ALREADY_EXISTS', 'BAD_REQUEST'],
|
['ALREADY_EXISTS', 'BAD_REQUEST'],
|
||||||
""
|
?DESC(create_banned_api_response_400))
|
||||||
?DESC(create_banned_api_response_400)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -95,9 +93,7 @@ schema("/banned/:as/:who") ->
|
||||||
204 => <<"Delete banned success">>,
|
204 => <<"Delete banned success">>,
|
||||||
404 => emqx_dashboard_swagger:error_codes(
|
404 => emqx_dashboard_swagger:error_codes(
|
||||||
['NOT_FOUND'],
|
['NOT_FOUND'],
|
||||||
""
|
?DESC(create_banned_api_response_404))
|
||||||
?DESC(delete_banned_api_response_400)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.
|
}.
|
||||||
|
|
Loading…
Reference in New Issue