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

fix(web): 修改了部分bug

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