Skip to content

Commit

Permalink
fix #103
Browse files Browse the repository at this point in the history
  • Loading branch information
shalousun committed Feb 25, 2023
1 parent 551a41d commit 446ca3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/power/doc/template/IRestDocTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,7 @@ default ApiMethodReqParam requestParams(final DocJavaMethod docJavaMethod, Proje
+ paramName + "\" in method " + javaMethod.getName() + " from " + className);
}
StringBuilder comment = new StringBuilder(this.paramCommentResolve(paramTagMap.get(paramName)));
if (requestFieldToUnderline) {
paramName = StringUtil.camelToUnderline(paramName);
}

JavaClass javaClass = builder.getJavaProjectBuilder().getClassByName(fullTypeName);
String mockValue = JavaFieldUtil.createMockValue(paramsComments, paramName, typeName, simpleTypeName);
List<JavaAnnotation> annotations = parameter.getAnnotations();
Expand Down Expand Up @@ -859,6 +857,9 @@ default ApiMethodReqParam requestParams(final DocJavaMethod docJavaMethod, Proje
required = Boolean.parseBoolean(strRequired);
}
comment.append(JavaFieldUtil.getJsrComment(annotations));
if (requestFieldToUnderline && !isPathVariable) {
paramName = StringUtil.camelToUnderline(paramName);
}
//file upload
if (JavaClassValidateUtil.isFile(typeName)) {
ApiParam param = ApiParam.of().setField(paramName).setType(DocGlobalConstants.PARAM_TYPE_FILE)
Expand Down

0 comments on commit 446ca3c

Please sign in to comment.