Support optional labels on logic-function input schema fields (#20471)

Adds an optional label field to logic-function input schema properties
(InputSchemaProperty and InputJsonSchema). When set, the workflow
builder renders the label in place of the raw property key for both leaf
inputs and nested sections; when unset, it falls back to the key.
jsonSchemaToInputSchema propagates the label so app authors can declare
it in their JSON schema. Payload paths, the variable picker, and saved
workflow inputs continue to use the property key — labels are
display-only.
This commit is contained in:
Abdul Rahman
2026-05-12 12:10:10 +05:30
committed by GitHub
parent 93df64b9b0
commit 1adb59f7f8
5 changed files with 65 additions and 10 deletions
@@ -3,6 +3,7 @@ import {
type InputSchema,
type InputSchemaProperty,
} from '@/workflow/types/InputSchema';
import { isNonEmptyString } from '@sniptt/guards';
const convertProperty = (jsonSchema: InputJsonSchema): InputSchemaProperty => {
const property: InputSchemaProperty = { type: 'unknown' };
@@ -50,6 +51,10 @@ const convertProperty = (jsonSchema: InputJsonSchema): InputSchemaProperty => {
property.multiline = true;
}
if (isNonEmptyString(jsonSchema.label)) {
property.label = jsonSchema.label;
}
return property;
};