Skip to main content

Parameter Schema

Each Action defines a parameter schema that describes the form users will fill when running the Action. The schema follows the JSON Schema format, with custom UI extensions.

Structure

The schema must include a top-level sections array. Each section represents a logical grouping of related fields.

Top-Level Fields

FieldTypeRequiredDescription
sectionsarrayList of sections with form fields

Section Object

FieldTypeRequiredDescription
labelstringDisplay name for the section
keystringUnique identifier
fieldsarrayList of input fields

Field Object

FieldTypeRequiredDescription
keystringField name (used as identifier)
typestringOne of: text, textarea, select, checkbox, multi-select, secret
labelstringDisplay label
requiredboolean or predicateWhether the field is required
optionsarrayUsed for select/multi-select fields
dataSourceobjectURL for dynamic field options

Example

{
"sections": [
{
"label": "Repository Configuration",
"key": "repoConfig",
"fields": [
{
"key": "repositoryName",
"type": "text",
"label": "Repository Name",
"required": true
},
{
"key": "branch",
"type": "text",
"label": "Branch Name",
"defaultValue": "main"
},
{
"key": "language",
"type": "select",
"label": "Language",
"required": true,
"options": [
{ "value": "java", "label": "Java" },
{ "value": "python", "label": "Python" },
{ "value": "node", "label": "Node.js" }
]
}
]
}
]
}

Full Schema Definition

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ParameterMetaSchema",
"type": "object",
"required": ["sections"],
"properties": {
"sections": {
"type": "array",
"items": {
"type": "object",
"required": ["key", "label", "fields"],
"properties": {
"key": { "type": "string" },
"label": { "type": "string" },
"fields": {
"type": "array",
"items": {
"type": "object",
"required": ["key", "type", "label"],
"properties": {
"key": { "type": "string" },
"type": {
"type": "string",
"enum": ["text", "select", "checkbox", "multi-select", "secret", "textarea"]
},
"label": { "type": "string" },
"help": { "type": "string" },
"pattern": { "type": "string" },
"required": { "$ref": "#/$defs/PredicateUnion" },
"disabled": { "$ref": "#/$defs/PredicateUnion" },
"defaultValue": {},
"options": {
"type": "array",
"items": {
"type": "object",
"required": ["value", "label"],
"properties": {
"value": {},
"label": { "type": "string" }
},
"additionalProperties": false
}
},
"dataSource": {
"type": "object",
"required": ["url"],
"properties": {
"url": { "type": "string", "format": "uri" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
}
},
"$defs": {
"Predicate": {
"type": "object",
"required": ["key"],
"properties": {
"key": { "type": "string" },
"empty": { "type": "boolean" },
"equals": {},
"notEquals": {},
"in": { "type": "array" },
"notIn": { "type": "array" }
},
"oneOf": [
{ "required": ["empty"] },
{ "required": ["equals"] },
{ "required": ["notEquals"] },
{ "required": ["in"] },
{ "required": ["notIn"] }
],
"additionalProperties": false
},
"PredicateGroup": {
"type": "object",
"required": ["operation", "comparators"],
"properties": {
"operation": {
"type": "string",
"enum": ["all", "any"]
},
"comparators": {
"type": "array",
"items": { "$ref": "#/$defs/Predicate" },
"minItems": 1
}
},
"additionalProperties": false
},
"PredicateUnion": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#/$defs/Predicate" },
{ "$ref": "#/$defs/PredicateGroup" }
]
}
},
"additionalProperties": false
}