修复生成openApi3.0.json时,相同链接不同提交方法生成错误
This commit is contained in:
parent
687fe17ddc
commit
6a226f1448
|
@ -108,7 +108,15 @@ public class OpenApiBuilder {
|
|||
apiMethodDocs.forEach(
|
||||
method -> {
|
||||
//设置paths的请求url 将双斜杠替换成单斜杠
|
||||
pathMap.put(method.getPath().replace("//", "/"), buildPathUrls(method, a));
|
||||
String url = method.getPath().replace("//", "/");
|
||||
Map<String, Object> request = buildPathUrls(method, a);
|
||||
//pathMap.put(method.getPath().replace("//", "/"), buildPathUrls(method, a));
|
||||
if (!pathMap.containsKey(url)) {
|
||||
pathMap.put(url, request);
|
||||
} else {
|
||||
Map<String, Object> oldRequest = (Map<String, Object>) pathMap.get(url);
|
||||
oldRequest.putAll(request);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue