From d68dd5e8f8933252298cca2cf3f87aa7213283d5 Mon Sep 17 00:00:00 2001 From: Lahiru De Silva Date: Sat, 21 Mar 2026 13:22:04 +0530 Subject: [PATCH] feat: add optional endpoint basepath in endpoint editor Signed-off-by: Lahiru De Silva --- plugins/openchoreo-common/src/types/bff-types.ts | 2 ++ .../components/EndpointEditor/EndpointEditor.tsx | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/plugins/openchoreo-common/src/types/bff-types.ts b/plugins/openchoreo-common/src/types/bff-types.ts index 6818bc53..67d18859 100644 --- a/plugins/openchoreo-common/src/types/bff-types.ts +++ b/plugins/openchoreo-common/src/types/bff-types.ts @@ -729,6 +729,8 @@ export interface WorkloadEndpoint { /** @enum {string} */ type: 'TCP' | 'UDP' | 'HTTP' | 'gRPC' | 'Websocket' | 'GraphQL'; port: number; + /** @description Base path of the API exposed via the endpoint */ + basePath?: string; schema?: Schema; } diff --git a/plugins/openchoreo-react/src/components/EndpointEditor/EndpointEditor.tsx b/plugins/openchoreo-react/src/components/EndpointEditor/EndpointEditor.tsx index a4c19d2f..1ee5c0a1 100644 --- a/plugins/openchoreo-react/src/components/EndpointEditor/EndpointEditor.tsx +++ b/plugins/openchoreo-react/src/components/EndpointEditor/EndpointEditor.tsx @@ -297,6 +297,7 @@ export const EndpointEditor: FC = ({ {endpoint.type} : {endpoint.port} + {endpoint.basePath ? ` ยท ${endpoint.basePath}` : ''} {(() => { const vis = endpoint.visibility ?? []; const displayVis = vis.includes('project') @@ -440,6 +441,21 @@ export const EndpointEditor: FC = ({ + + + onChange('basePath', e.target.value || undefined) + } + fullWidth + variant="outlined" + size="small" + disabled={disabled} + placeholder="/api/v1" + helperText="API basepath (optional)" + /> +