feat: 接口管理功能 - 分页查询、详情查看、测试代理

- 后端:OpenAPI spec 解析同步、接口分页查询、代理测试(SSRF防护)
- 前端:接口列表页、详情对话框(详情/测试双标签)、Token来源选择
- 服务启动自动同步接口数据,支持手动触发同步
- 测试代理路径修复:自动添加 /api 前缀以匹配后端 SSRF 校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 19:19:08 +08:00
parent 128e163688
commit a4c99b9b0b
6 changed files with 1857 additions and 2 deletions
+9 -1
View File
@@ -107,7 +107,15 @@ const routes: RouteRecordRaw[] = [
name: 'ApiTester',
component: () => import('@/views/tools/ApiTester.vue'),
meta: { title: 'API接口调用' }
},
}
]
},
{
path: '/endpoint',
component: Layout,
redirect: '/endpoint/list',
meta: { title: '接口管理', icon: 'Tools' },
children: [
{
path: 'list',
name: 'EndpointList',
@@ -175,7 +175,7 @@ const handleTest = async () => {
const res: any = await testEndpoint({
method: testForm.value.method,
path: testForm.value.path,
path: '/api' + testForm.value.path,
body: testForm.value.body || undefined,
headers,
params: Object.keys(queryParams).length > 0 ? queryParams : undefined,