refactor(接口测试): swagger导入不覆盖前后置和断言

This commit is contained in:
wxg0103 2024-05-28 14:40:46 +08:00 committed by Craftsman
parent e331f30881
commit d94e4f4ba3
1 changed files with 3 additions and 0 deletions

View File

@ -514,6 +514,9 @@ public class ApiDefinitionImportUtilService {
//不相同的数据需要覆盖 所以这里记录id就可以
if (!isSame) {
importDTO.setId(apiDefinitionDTO.getId());
if (StringUtils.equals(request.getPlatform(), ApiImportPlatform.Swagger3.name())) {
importDTO.getRequest().setChildren(dbRequest.getChildren());
}
updateRequestData.add(importDTO);
logMap.put(apiDefinitionDTO.getId(), importDTO);
}