提交 f3980f7f authored 作者: mry's avatar mry

fix(base): 修改了swagger的部分bug

上级 e6708cbd
...@@ -127,9 +127,8 @@ public class SwaggerController { ...@@ -127,9 +127,8 @@ public class SwaggerController {
Object summary = objRequestMaps.get("summary"); Object summary = objRequestMaps.get("summary");
List<Parameter> parameterAllList = new ArrayList<>(); List<Parameter> parameterAllList = new ArrayList<>();
InterfaceInformation interfaceInformation = new InterfaceInformation(); InterfaceInformation interfaceInformation = new InterfaceInformation();
if (true) {
@SuppressWarnings(value = "all") @SuppressWarnings(value = "all")
List<String> parameterLists = parameters == null ? new ArrayList<>(): (List<String>)parameters; List<String> parameterLists = parameters == null ? new ArrayList<>() : (List<String>) parameters;
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;
...@@ -149,14 +148,13 @@ public class SwaggerController { ...@@ -149,14 +148,13 @@ public class SwaggerController {
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));
interfaceInformation.setRequest(request); interfaceInformation.setRequest(request.toUpperCase());
interfaceInformation.setSummary(String.valueOf(summary)); interfaceInformation.setSummary(String.valueOf(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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论