fix: bad code format

This commit is contained in:
DDDHuang 2022-04-18 20:20:24 +08:00
parent 17aa81a04f
commit f5c5e1f96e
3 changed files with 10 additions and 7 deletions

View File

@ -25,6 +25,13 @@ emqx_mgmt_api_banned {
}
}
create_banned_api_response_404 {
desc {
en: """Banned not existed."""
zh: """黑名单不存在"""
}
}
delete_banned_api {
desc {
en: """Delete banned"""

View File

@ -68,7 +68,7 @@ fields(alarm) ->
#{desc => ?DESC(node), example => atom_to_list(node())})},
{name, hoconsc:mk(binary(),
#{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%">>})},
{details, hoconsc:mk(map(), #{desc => ?DESC(details),
example => #{<<"high_watermark">> => 70}})},

View File

@ -70,9 +70,7 @@ schema("/banned") ->
200 => [{data, hoconsc:mk(hoconsc:array(hoconsc:ref(ban)), #{})}],
400 => emqx_dashboard_swagger:error_codes(
['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">>,
404 => emqx_dashboard_swagger:error_codes(
['NOT_FOUND'],
""
?DESC(delete_banned_api_response_400)
)
?DESC(create_banned_api_response_404))
}
}
}.