fix(接口测试): 针对tcp导入文件中同名不同径的数据做优化处理
--bug=1046934 --user=宋天阳 【接口测试】接口导入-MeterSphere格式-tcp请求-A模块下有B模块-且A模块下与B模块下存在同名的TCP接口-导入项目后,只导入显示了A模块下的一个接口 https://www.tapd.cn/55049933/s/1583426
This commit is contained in:
parent
9d062148cb
commit
33ccd948a2
|
@ -1,7 +1,6 @@
|
||||||
package io.metersphere.api.parser.api;
|
package io.metersphere.api.parser.api;
|
||||||
|
|
||||||
|
|
||||||
import io.metersphere.api.domain.ApiDefinition;
|
|
||||||
import io.metersphere.api.dto.converter.ApiDefinitionDetail;
|
import io.metersphere.api.dto.converter.ApiDefinitionDetail;
|
||||||
import io.metersphere.api.dto.converter.ApiDefinitionExportDetail;
|
import io.metersphere.api.dto.converter.ApiDefinitionExportDetail;
|
||||||
import io.metersphere.api.dto.converter.ApiImportDataAnalysisResult;
|
import io.metersphere.api.dto.converter.ApiImportDataAnalysisResult;
|
||||||
|
@ -94,7 +93,7 @@ public class MetersphereParserApiDefinition implements ApiDefinitionImportParser
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//非HTTP类型,通过 name判断,后续处理会过滤掉路径不一致的
|
//非HTTP类型,通过 name判断,后续处理会过滤掉路径不一致的
|
||||||
Map<String, ApiDefinitionDetail> importDataMap = importDetail.stream().collect(Collectors.toMap(ApiDefinition::getName, t -> t, (oldValue, newValue) -> newValue));
|
Map<String, ApiDefinitionDetail> importDataMap = importDetail.stream().collect(Collectors.toMap(t -> t.getModulePath() + t.getName(), t -> t, (oldValue, newValue) -> newValue));
|
||||||
Map<String, List<ApiDefinitionDetail>> savedApiDefinitionMap = existenceApiDefinitionList.stream().collect(Collectors.groupingBy(ApiDefinitionDetail::getName));
|
Map<String, List<ApiDefinitionDetail>> savedApiDefinitionMap = existenceApiDefinitionList.stream().collect(Collectors.groupingBy(ApiDefinitionDetail::getName));
|
||||||
|
|
||||||
importDataMap.forEach((key, api) -> {
|
importDataMap.forEach((key, api) -> {
|
||||||
|
|
Loading…
Reference in New Issue