Skip to content

Commit

Permalink
fix #625
Browse files Browse the repository at this point in the history
  • Loading branch information
shalousun committed Oct 13, 2023
1 parent 80166bb commit b88212e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/ly/doc/helper/JsonBuildHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ public static String buildJson(String typeName, String genericCanonicalName,
CustomField customResponseField = CustomField.nameEquals(key, builder.getCustomRespFieldMap());
CustomField customRequestField = CustomField.nameEquals(key, builder.getCustomReqFieldMap());
if (Objects.nonNull(customRequestField)) {
if (JavaClassUtil.isTargetChildClass(typeName, customRequestField.getOwnerClassName()) && (customRequestField.isIgnore())
if (JavaClassUtil.isTargetChildClass(docField.getDeclaringClassName(), customRequestField.getOwnerClassName()) && (customRequestField.isIgnore())
&& !isResp) {
continue;
} else {
fieldName = StringUtil.isEmpty(customRequestField.getReplaceName()) ? fieldName : customRequestField.getReplaceName();
}
}
if (Objects.nonNull(customResponseField)) {
if (JavaClassUtil.isTargetChildClass(typeName, customResponseField.getOwnerClassName()) && (customResponseField.isIgnore())
if (JavaClassUtil.isTargetChildClass(docField.getDeclaringClassName(), customResponseField.getOwnerClassName()) && (customResponseField.isIgnore())
&& isResp) {
continue;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/ly/doc/helper/ParamsBuildHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ public static List<ApiParam> buildParams(String className, String pre, int level

CustomField customResponseField = CustomField.nameEquals(key, projectBuilder.getCustomRespFieldMap());
CustomField customRequestField = CustomField.nameEquals(key, projectBuilder.getCustomReqFieldMap());
if (customResponseField != null && JavaClassUtil.isTargetChildClass(simpleName, customResponseField.getOwnerClassName())
if (customResponseField != null && JavaClassUtil.isTargetChildClass(docField.getDeclaringClassName(), customResponseField.getOwnerClassName())
&& (customResponseField.isIgnore()) && isResp) {
continue;
}
if (customRequestField != null && JavaClassUtil.isTargetChildClass(simpleName, customRequestField.getOwnerClassName())
if (customRequestField != null && JavaClassUtil.isTargetChildClass(docField.getDeclaringClassName(), customRequestField.getOwnerClassName())
&& (customRequestField.isIgnore()) && !isResp) {
continue;
}
Expand Down

0 comments on commit b88212e

Please sign in to comment.