Skip to content

Commit

Permalink
Merge pull request #462 from netdied/master
Browse files Browse the repository at this point in the history
fix #458
  • Loading branch information
shalousun authored Mar 27, 2023
2 parents 4a224cc + 9955b2d commit 4649e5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public Map<String, Object> buildProperties(List<ApiParam> apiParam, Map<String,
if (param.isRequired()) {
requiredList.add(param.getField());
}
if (param.getType().equals("map") && paramsSize == 1) {
if (param.getType().equals("map") &&StringUtil.isEmpty(param.getClassName())) {
continue;
}
if (param.isQueryParam() || param.isPathParam()) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/power/doc/utils/OpenApiSchemaUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public static Map<String, Object> returnSchema(String returnGicName) {
public static String getClassNameFromParams(List<ApiParam> apiParams, String suffix) {
// if array[Primitive] or Primitive
if (CollectionUtil.isNotEmpty(apiParams) && apiParams.size() == 1
&& StringUtil.isEmpty(apiParams.get(0).getClassName())
&& CollectionUtil.isEmpty(apiParams.get(0).getChildren())) {
return "string";
}
Expand Down

0 comments on commit 4649e5d

Please sign in to comment.