fix: dashboard swagger desc & description check

This commit is contained in:
DDDHuang 2022-03-17 15:43:52 +08:00
parent b9b5e376a6
commit 66c6ea4c23
1 changed files with 7 additions and 1 deletions

View File

@ -311,7 +311,13 @@ trans_desc(Init, Hocon, Func, Name) ->
trans_desc(Spec, Hocon) ->
case hocon_schema:field_schema(Hocon, desc) of
undefined -> Spec;
undefined ->
case hocon_schema:field_schema(Hocon, description) of
undefined ->
Spec;
Desc ->
Spec#{description => to_bin(Desc)}
end;
Desc -> Spec#{description => to_bin(Desc)}
end.