Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit 2c85f87

Browse files
committed
fix(openapi): 🐛 Resolve stack overflow issue caused by duplicate ApiParam IDs when returning values with a Map (enum as key)
1 parent 0df87af commit 2c85f87

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/ly/doc/helper/ParamsBuildHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ private static List<ApiParam> buildMapParam(String[] globGicName, String pre, in
743743
.map(JavaClass::getComment)
744744
.orElse(DocGlobalConstants.DEFAULT_MAP_KEY_DESC))
745745
.setVersion(DocGlobalConstants.DEFAULT_VERSION)
746-
.setPid(null == keyParentId ? pid : keyParentId)
747-
.setId(paramList.size() + 1);
746+
.setPid(null == keyParentId ? pid : keyParentId);
747+
apiParam.setId(apiParam.getPid() + paramList.size() + 1);
748748
if (null == keyParentId) {
749749
keyParentId = apiParam.getPid();
750750
}

0 commit comments

Comments
 (0)