Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue If there are enumerations in the query request parameters, the generated request parameter comments will not include 'See'. #945

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/ly/doc/helper/ParamsBuildHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ private static void commonHandleParam(List<ApiParam> paramList, ApiParam param,
paramList.add(param);
}

private static String handleEnumComment(JavaClass javaClass, ProjectDocConfigBuilder projectBuilder) {
public static String handleEnumComment(JavaClass javaClass, ProjectDocConfigBuilder projectBuilder) {
String comment = "";
if (!javaClass.isEnum()) {
return comment;
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/ly/doc/template/IRestDocTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -1223,11 +1223,8 @@ else if (JavaClassValidateUtil.isMap(fullyQualifiedName)) {
}
// Handle if it is enum types
else if (javaClass.isEnum()) {
String enumName = JavaClassUtil.getEnumParams(javaClass);
Object value = JavaClassUtil.getEnumValue(javaClass, builder, isPathVariable || queryParam);
if (Boolean.TRUE.equals(builder.getApiConfig().getInlineEnum())) {
comment.append("<br/>[Enum: ").append(StringUtil.removeQuotes(enumName)).append("]");
}
comment.append(ParamsBuildHelper.handleEnumComment(javaClass, builder));
ApiParam param = ApiParam.of()
.setField(paramName)
.setId(paramList.size() + 1)
Expand Down