mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 04:28:51 +08:00
fix(接口测试): 接口导入swagger导入不增加case
--user=郭雨琦
This commit is contained in:
parent
321350f17a
commit
7e1c31e429
@ -932,7 +932,10 @@ public class ApiDefinitionService {
|
||||
} else {
|
||||
apiDefinition.setVersionId(apiTestImportRequest.getDefaultVersion());
|
||||
}
|
||||
caseList = setRequestAndAddNewCase(apiDefinition, caseList, true);
|
||||
|
||||
boolean newCreate = !StringUtils.equals(ApiImportPlatform.Swagger2.name(), apiDefinitionImportParamDTO.getApiTestImportRequest().getPlatform())
|
||||
&& !StringUtils.isNotBlank(apiDefinitionImportParamDTO.getApiTestImportRequest().getSwaggerUrl());
|
||||
caseList = setRequestAndAddNewCase(apiDefinition, caseList, newCreate);
|
||||
reSetImportMocksApiId(mocks, originId, apiDefinition.getId(), apiDefinition.getNum());
|
||||
batchMapper.insert(apiDefinition);
|
||||
List<ApiTestCaseDTO> apiTestCaseDTOS = importCase(apiDefinition, apiTestCaseMapper, caseList);
|
||||
@ -1067,7 +1070,9 @@ public class ApiDefinitionService {
|
||||
}
|
||||
|
||||
reSetImportMocksApiId(mocks, originId, apiDefinition.getId(), apiDefinition.getNum());
|
||||
caseList = setRequestAndAddNewCase(apiDefinition, caseList, true);
|
||||
boolean newCreate = !StringUtils.equals(ApiImportPlatform.Swagger2.name(), apiDefinitionImportParamDTO.getApiTestImportRequest().getPlatform())
|
||||
&& !StringUtils.isNotBlank(apiDefinitionImportParamDTO.getApiTestImportRequest().getSwaggerUrl());
|
||||
caseList = setRequestAndAddNewCase(apiDefinition, caseList, newCreate);
|
||||
batchMapper.insert(apiDefinition);
|
||||
ApiDefinitionResult apiDefinitionResult = getApiDefinitionResult(apiDefinition, false);
|
||||
apiImportSendNoticeDTO.setApiDefinitionResult(apiDefinitionResult);
|
||||
|
Loading…
Reference in New Issue
Block a user