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
| Field | Type | Required | Description |
|---|---|---|---|
sections | array | ✅ | List of sections with form fields |
Section Object
| Field | Type | Required | Description |
|---|---|---|---|
label | string | ✅ | Display name for the section |
key | string | ✅ | Unique identifier |
fields | array | ✅ | List of input fields |
Field Object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Field name (used as identifier) |
type | string | ✅ | One of: text, textarea, select, checkbox, multi-select, secret |
label | string | ✅ | Display label |
required | boolean or predicate | ❌ | Whether the field is required |
options | array | ❌ | Used for select/multi-select fields |
dataSource | object | ❌ | URL 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
}