Skip to content

Commit

Permalink
fix #344
Browse files Browse the repository at this point in the history
  • Loading branch information
shalousun committed Sep 6, 2022
1 parent 382e92a commit 48c89b3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/com/power/doc/utils/TornaUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ public static List<HttpParam> buildHerder(List<ApiReqParam> apiReqParams) {
httpParam.setName(header.getName());
httpParam.setRequired(header.isRequired() ? TornaConstants.YES : TornaConstants.NO);
httpParam.setExample(StringUtil.removeQuotes(header.getValue()));
httpParam.setDescription(header.getDesc());
if (StringUtil.isNotEmpty(header.getSince())&&"-".equals(header.getSince())) {
httpParam.setDescription(header.getDesc()+"@since "+header.getSince());
} else {
httpParam.setDescription(header.getDesc());
}
headers.add(httpParam);
}
return headers;
Expand All @@ -194,7 +198,11 @@ public static List<HttpParam> buildParams(List<ApiParam> apiParams) {
httpParam.setType(type);
httpParam.setRequired(apiParam.isRequired() ? TornaConstants.YES : TornaConstants.NO);
httpParam.setExample(StringUtil.removeQuotes(apiParam.getValue()));
httpParam.setDescription(DocUtil.replaceNewLineToHtmlBr(apiParam.getDesc()));
if (StringUtil.isNotEmpty(apiParam.getVersion())&&"-".equals(apiParam.getVersion())) {
httpParam.setDescription(DocUtil.replaceNewLineToHtmlBr(apiParam.getDesc())+ "@since "+apiParam.getVersion());
} else {
httpParam.setDescription(DocUtil.replaceNewLineToHtmlBr(apiParam.getDesc()));
}
httpParam.setEnumInfo(apiParam.getEnumInfo());
if (apiParam.getChildren() != null) {
httpParam.setChildren(buildParams(apiParam.getChildren()));
Expand Down

0 comments on commit 48c89b3

Please sign in to comment.