From 4aecbfc3ffe342eac08158a3d7a8c874b566f17f Mon Sep 17 00:00:00 2001 From: jhonliu <34489690@qq.com> Date: Thu, 5 May 2022 21:23:14 +0800 Subject: [PATCH] fix: chane to sumary --- apps/dgiot_api/src/utils/dgiot_swagger.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dgiot_api/src/utils/dgiot_swagger.erl b/apps/dgiot_api/src/utils/dgiot_swagger.erl index 3d8a7654..0bb8b4f0 100644 --- a/apps/dgiot_api/src/utils/dgiot_swagger.erl +++ b/apps/dgiot_api/src/utils/dgiot_swagger.erl @@ -425,10 +425,10 @@ tree() -> Tree1 = lists:foldl(fun(Value, Acc) -> lists:foldl(fun(Value1, Acc1) -> - lists:foldl(fun(#{<<"description">> := PathDescription, <<"operationId">> := OperationId, <<"tags">> := [PathTag | _]}, Acc2) -> + lists:foldl(fun(#{<<"summary">> := Summary, <<"operationId">> := OperationId, <<"tags">> := [PathTag | _]}, Acc2) -> case maps:find(PathTag, Acc2) of {ok, #{<<"children">> := Children, <<"target">> := TagTarget} = V} -> - Path = #{<<"label">> => PathDescription, <<"target">> => <>}, + Path = #{<<"label">> => Summary, <<"target">> => <>}, Acc2#{PathTag => V#{<<"children">> => Children ++ [Path]}}; error -> Acc2