提交 8ac4a41f authored 作者: mry's avatar mry

fix(web): 修改了部分bug

上级 0d4bb98e
......@@ -82,9 +82,7 @@ public class SwaggerController {
Map<String, String> pathsMaps = (Map<String, String>) paths;
//获取key
Set<String> methodUrls = pathsMaps.keySet();
List<InterfaceInformation> list = new ArrayList<>();
//循环获取每个methodUrl
for (String methodUrl : methodUrls) {
//将paths转成JSON
......@@ -108,6 +106,7 @@ public class SwaggerController {
@SuppressWarnings(value = "all")
List<String> parameterLists = (List<String>) parameters;
Parameter parameter = new Parameter();
InterfaceInformation interfaceInformation = new InterfaceInformation();
for (Object parameterList : parameterLists) {
@SuppressWarnings(value = "unchecked")
Map<String, String> parameterMaps = (Map<String, String>) parameterList;
......@@ -119,22 +118,15 @@ public class SwaggerController {
parameter.setType(type);
parameterAllList.add(parameter);
}
interfaceInformation.setHost(String.valueOf(host));
interfaceInformation.setParameterAllList(parameterAllList);
interfaceInformation.setBasePath(String.valueOf(basePath));
interfaceInformation.setRequest(request);
interfaceInformation.setSummary(summary);
interfaceInformation.setMethodUrl(methodUrl);
interfaceInformation.setTags(String.valueOf(tags));
list.add(interfaceInformation);
}
InterfaceInformation interfaceInformation = new InterfaceInformation();
interfaceInformation.setHost(String.valueOf(host));
interfaceInformation.setParameterAllList(parameterAllList);
interfaceInformation.setBasePath(String.valueOf(basePath));
interfaceInformation.setRequest(request);
interfaceInformation.setSummary(summary);
interfaceInformation.setMethodUrl(methodUrl);
interfaceInformation.setTags(String.valueOf(tags));
list.add(interfaceInformation);
}
}
return list;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论