Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/openchoreo-common/src/types/bff-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ export const EndpointEditor: FC<EndpointEditorProps> = ({
</Typography>
<Typography className={classes.readOnlyDetails}>
{endpoint.type} : {endpoint.port}
{endpoint.basePath ? ` · ${endpoint.basePath}` : ''}
{(() => {
const vis = endpoint.visibility ?? [];
const displayVis = vis.includes('project')
Expand Down Expand Up @@ -440,6 +441,21 @@ export const EndpointEditor: FC<EndpointEditorProps> = ({
</FormGroup>
</FormControl>
</Grid>
<Grid item xs={12}>
<TextField
label="Base Path"
value={endpoint.basePath || ''}
onChange={e =>
onChange('basePath', e.target.value || undefined)
}
fullWidth
variant="outlined"
size="small"
disabled={disabled}
placeholder="/api/v1"
helperText="API basepath (optional)"
/>
</Grid>
<Grid item xs={12}>
<Box className={classes.schemaContentField}>
<TextField
Expand Down
Loading