From 623ac7ea6d0b33c40e4482573d4a2c0b9531604e Mon Sep 17 00:00:00 2001 From: Yeuoly <45712896+Yeuoly@users.noreply.github.com> Date: Wed, 7 May 2025 16:46:02 +0800 Subject: [PATCH] feat: add optional hidden property to endpoint items and filter hidden endpoints in endpoint card (#19163) --- .../components/plugins/plugin-detail-panel/endpoint-card.tsx | 2 +- web/app/components/plugins/types.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx index 9ab0c5b9a3..cc3688aebc 100644 --- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx +++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx @@ -149,7 +149,7 @@ const EndpointCard = ({ - {data.declaration.endpoints.map((endpoint, index) => ( + {data.declaration.endpoints.filter(endpoint => !endpoint.hidden).map((endpoint, index) => (
{endpoint.method}
diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index 5ed05d4523..f552d7c17a 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -36,6 +36,7 @@ export type PluginEndpointDeclaration = { export type EndpointItem = { path: string method: string + hidden?: boolean } export type EndpointListItem = {