From 49c79fdcd8cb30660415099121629a20efa03c2f Mon Sep 17 00:00:00 2001 From: gongyangfan Date: Thu, 31 Oct 2024 17:44:01 +0800 Subject: [PATCH] fix: Fix issue If there are enumerations in the query request parameters, the generated request parameter comments will not include 'See'. --- src/main/java/com/ly/doc/template/IRestDocTemplate.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/ly/doc/template/IRestDocTemplate.java b/src/main/java/com/ly/doc/template/IRestDocTemplate.java index d7be8e19..812029c9 100644 --- a/src/main/java/com/ly/doc/template/IRestDocTemplate.java +++ b/src/main/java/com/ly/doc/template/IRestDocTemplate.java @@ -1175,6 +1175,12 @@ else if (javaClass.isEnum()) { if (Boolean.TRUE.equals(builder.getApiConfig().getInlineEnum())) { comment.append("
[Enum: ").append(StringUtil.removeQuotes(enumName)).append("]"); } + else { + String enumComments = javaClass.getComment(); + if (StringUtil.isNotEmpty(enumComments)) { + comment.append("
(See: ").append(enumComments).append(")"); + } + } ApiParam param = ApiParam.of() .setField(paramName) .setId(paramList.size() + 1)