diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 29e24cf5b9..f4887428e0 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -1474,7 +1474,7 @@ public class ApiDefinitionService { return new ArrayList<>(); } else { ApiDefinitionExample example = new ApiDefinitionExample(); - example.createCriteria().andMethodEqualTo(method).andProjectIdEqualTo(projectId); + example.createCriteria().andMethodEqualTo(method).andProjectIdEqualTo(projectId).andStatusNotEqualTo("Trash").andProtocolEqualTo("HTTP"); List apiList = apiDefinitionMapper.selectByExample(example); List apiIdList = new ArrayList<>(); @@ -1489,6 +1489,9 @@ public class ApiDefinitionService { } for (ApiDefinition api : apiList) { String path = api.getPath(); + if(StringUtils.isEmpty(path)){ + continue; + } if (path.startsWith("/")) { path = path.substring(1); } diff --git a/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue b/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue index ac581cb2dd..510fdb29a2 100644 --- a/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue +++ b/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue @@ -1,7 +1,8 @@