diff --git a/src/main/java/com/power/doc/template/IRestDocTemplate.java b/src/main/java/com/power/doc/template/IRestDocTemplate.java index 5fb51c03..c2ff7a35 100644 --- a/src/main/java/com/power/doc/template/IRestDocTemplate.java +++ b/src/main/java/com/power/doc/template/IRestDocTemplate.java @@ -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 annotations = parameter.getAnnotations(); @@ -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)