From d94e4f4ba33f452f3176035edd97fecc2f51751a Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 28 May 2024 14:40:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20swagger=E5=AF=BC=E5=85=A5=E4=B8=8D=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E5=89=8D=E5=90=8E=E7=BD=AE=E5=92=8C=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/definition/ApiDefinitionImportUtilService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java index e343f82a28..ea256e3e3f 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java @@ -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); }