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)" + /> +