You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add nested schema support for workflow variables
- Add value_schema, properties, item_schema fields to VariableDefinition
- Make label field Optional<String> to support nested schemas
- Add recursive validate_variable_value() function for nested validation
- Validate arrays with item_schema at any depth
- Validate objects with properties (known structure)
- Validate objects with value_schema (uniform value types)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: terminator-mcp-agent/src/utils.rs
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -880,8 +880,9 @@ pub enum VariableType {
880
880
pubstructVariableDefinition{
881
881
#[schemars(description = "The data type of the variable.")]
882
882
pubr#type:VariableType,
883
-
#[schemars(description = "A user-friendly label for the variable, for UI generation.")]
884
-
publabel:String,
883
+
#[schemars(description = "A user-friendly label for the variable, for UI generation. Optional for nested schemas (value_schema, properties, item_schema).")]
884
+
#[serde(default)]
885
+
publabel:Option<String>,
885
886
#[schemars(description = "A detailed description of what the variable is for.")]
886
887
pubdescription:Option<String>,
887
888
#[schemars(description = "The default value for the variable if not provided in the inputs.")]
#[schemars(description = "Whether this variable is required. Defaults to true.")]
894
895
pubrequired:Option<bool>,
896
+
#[schemars(description = "For object types with flat key-value structure, defines the schema for all values (e.g., all values must be enum with specific options).")]
897
+
pubvalue_schema:Option<Box<VariableDefinition>>,
898
+
#[schemars(description = "For object types with known properties, defines the schema for each named property.")]
0 commit comments