Renders an editable plugin-config form from a declarative field schema.
Fully controlled; keys in value that are not in the schema are preserved,
so hand-edited or newer config keys survive a round-trip through the form.
Per-field rendering and the serialized value each type produces:
text — single-line text input; serializes to a string.
number — numeric input; serializes to a number, or undefined when cleared
(so the key is dropped from the YAML rather than sent as an empty string).
textarea — multi-line input (rows, default 4) for bodies/templates/scripts;
serializes to a string.
radio — segmented button group for small always-visible enums
(e.g. rate-limit strategy); serializes to the selected option's string value.
select — native dropdown for longer enums (e.g. content_type);
serializes to the selected option's string value.
switch — boolean toggle with optional inline switchLabel; serializes to a boolean.
list — add/remove rows of a single scalar input (field.item.type picks
text or number); serializes to an array of strings or numbers
(e.g. cors allow_origins → ["https://app.example.com"]). New rows start
as '' (text) or 0 (number).
objects — add/remove cards, each rendering the sub-inputs in field.fields;
serializes to an array of records keyed by the sub-field keys
(e.g. proxy-rewrite add_headers → [{ name, value }], basic-auth users
→ [{ username, password }]). New cards are pre-filled from each sub-field's
default, else 0/'' by sub-field type; a numeric sub-field cleared to
empty serializes as undefined.
Every field shows its label above the input and optional hint text below.
Parameters
__namedParameters: SchemaFormProps
Returns Element
The stacked form fields for the given schema.
Remarks
Schemas live in ui/src/pluginConfig.ts (the pluginConfig map, keyed
by the gateway's plugin node types and looked up via getPluginConfigSchema).
The emitted config object is what the admin API persists as the node's
config block in gateway.yaml.
Renders an editable plugin-config form from a declarative field schema. Fully controlled; keys in
valuethat are not in the schema are preserved, so hand-edited or newer config keys survive a round-trip through the form.Per-field rendering and the serialized value each type produces:
text— single-line text input; serializes to a string.number— numeric input; serializes to a number, orundefinedwhen cleared (so the key is dropped from the YAML rather than sent as an empty string).textarea— multi-line input (rows, default 4) for bodies/templates/scripts; serializes to a string.radio— segmented button group for small always-visible enums (e.g. rate-limitstrategy); serializes to the selected option's string value.select— native dropdown for longer enums (e.g.content_type); serializes to the selected option's string value.switch— boolean toggle with optional inlineswitchLabel; serializes to a boolean.list— add/remove rows of a single scalar input (field.item.typepicks text or number); serializes to an array of strings or numbers (e.g. corsallow_origins→["https://app.example.com"]). New rows start as''(text) or0(number).objects— add/remove cards, each rendering the sub-inputs infield.fields; serializes to an array of records keyed by the sub-field keys (e.g. proxy-rewriteadd_headers→[{ name, value }], basic-authusers→[{ username, password }]). New cards are pre-filled from each sub-field'sdefault, else0/''by sub-field type; a numeric sub-field cleared to empty serializes asundefined.Every field shows its
labelabove the input and optionalhinttext below.