InputForm.json Syntax
{
"$id": "#ica-pipeline-input-form",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ICA Pipeline Input Forms",
"description": "Describes the syntax for defining input setting forms for ICA pipelines",
"type": "object",
"additionalProperties": false,
"properties": {
"fields": {
"description": "The list of setting fields",
"type": "array",
"items": {
"$ref": "#/definitions/ica_pipeline_input_form_field"
}
}
},
"required": [
"fields"
],
"definitions": {
"ica_pipeline_input_form_field": {
"$id": "#ica_pipeline_input_form_field",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "The unique identifier for this field. Will be available with this key to the pipeline script.",
"type": "string",
"pattern": "^[a-zA-Z-0-9\\-_\\.\\s\\+\\[\\]]+$"
},
"type": {
"type": "string",
"enum": [
"textbox",
"checkbox",
"radio",
"select",
"number",
"integer",
"data",
"section",
"text",
"fieldgroup"
]
},
"label": {
"type": "string"
},
"minValues": {
"description": "The minimal amount of values that needs to be present. Default is 0 when not provided. Set to >=1 to make the field required.",
"type": "integer",
"minimum": 0
},
"maxValues": {
"description": "The maximal amount of values that needs to be present. Default is 1 when not provided.",
"type": "integer",
"exclusiveMinimum": 0
},
"minMaxValuesMessage": {
"description": "The error message displayed when minValues or maxValues is not adhered to. When not provided a default message is generated.",
"type": "string"
},
"helpText": {
"type": "string"
},
"placeHolderText": {
"description": "An optional short hint (a word or short phrase) to aid the user when the field has no value."
"type": "string"
},
"value": {
"description": "The value for the field. Can be an array for multi-value fields.
For 'number' type values the exponent needs to be between -300 and +300 and max precision is 15.
For 'integer' type values the value needs to between -100000000000000000 and 100000000000000000"
},
"minLength": {
"type": "integer",
"minimum": 0
},
"maxLength": {
"type": "integer",
"exclusiveMinimum": 0
},
"min": {
"description": "Minimal allowed value for 'integer' and 'number' type. Exponent needs to be between -300 and +300 and max precision is 15.",
"type": "number"
},
"max": {
"description": "Maximal allowed value for 'integer' and 'number' type. Exponent needs to be between -300 and +300 and max precision is 15.",
"type": "number"
},
"choices": {
"type": "array",
"items": {
"$ref": "#/definitions/ica_pipeline_input_form_field_choice"
}
},
"fields": {
"description": "The list of setting sub fields for type fieldgroup",
"type": "array",
"items": {
"$ref": "#/definitions/ica_pipeline_input_form_field"
}
},
"dataFilter": {
"description": "For defining the filtering when type is 'data'.",
"type": "object",
"additionalProperties": false,
"properties": {
"nameFilter": {
"description": "Optional data filename filter pattern that input files need to adhere to when type is 'data'. Eg parts of the expected filename",
"type": "string"
},
"dataFormat": {
"description": "Optional dataformat name array that input files need to adhere to when type is 'data'",
"type": "array",
"contains": {
"type": "string"
}
},
"dataType": {
"description": "Optional data type (file or directory) that input files need to adhere to when type is 'data'",
"type": "string",
"enum": [
"file",
"directory"
]
}
}
},
"regex": {
"type": "string"
},
"regexErrorMessage": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"emptyValuesAllowed": {
"type": "boolean",
"description": "When maxValues is greater than 1 and emptyValuesAllowed is true, the values may contain null entries. Default is false."
},
"updateRenderOnChange": {
"type": "boolean",
"description": "When true, the onRender javascript function is triggered ech time the user changes the value of this field. Default is false."
}
"streamable": {
"type": "boolean",
"description": "EXPERIMENTAL PARAMETER! Only possible for fields of type 'data'. When true, the data input files will be offered in streaming mode to the pipeline instead of downloading them."
},
},
"required": [
"id",
"type"
],
"allOf": [
{
"if": {
"description": "When type is 'textbox' then 'dataFilter', 'fields', 'choices', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"textbox"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"choices",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'checkbox' then 'dataFilter', 'fields', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"checkbox"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"choices",
"placeHolderText",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'radio' then 'dataFilter', 'fields', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"radio"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"placeHolderText",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'select' then 'dataFilter', 'fields', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"select"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'number' or 'integer' then 'dataFilter', 'fields', 'choices', 'regex', 'regexErrorMessage', 'maxLength' and 'minLength' are not allowed",
"properties": {
"type": {
"enum": [
"number",
"integer"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"choices",
"regex",
"regexErrorMessage",
"maxLength",
"minLength"
]
}
}
}
},
{
"if": {
"description": "When type is 'data' then 'dataFilter' is required and 'fields', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"data"
]
}
},
"required": [
"type"
]
},
"then": {
"required": [
"dataFilter"
],
"propertyNames": {
"not": {
"enum": [
"fields",
"choices",
"placeHolderText",
"regex",
"regexErrorMessage",
"max",
"min",
"maxLength",
"minLength"
]
}
}
}
},
{
"if": {
"description": "When type is 'section' or 'text' then 'disabled', 'fields', 'updateRenderOnChange', 'classification', 'value', 'minValues', 'maxValues', 'minMaxValuesMessage', 'dataFilter', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"section",
"text"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"disabled",
"fields",
"updateRenderOnChange",
"classification",
"value",
"minValues",
"maxValues",
"minMaxValuesMessage",
"dataFilter",
"choices",
"regex",
"placeHolderText",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'fieldgroup' then 'fields' is required and then 'dataFilter', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"fieldgroup"
]
}
},
"required": [
"type",
"fields"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"choices",
"placeHolderText",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
}
]
},
"ica_pipeline_input_form_field_choice": {
"$id": "#ica_pipeline_input_form_field_choice",
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"description": "The value which will be set when selecting this choice. Must be unique over the choices within a field",
},
"text": {
"description": "The display text for this choice, similar as the label of a field. ",
"type": "string"
},
"selected": {
"description": "Optional. When true, this choice value is picked as default selected value.
As in Edgeos/BSSH selected=true has precedence over an eventual set field 'value'.
For clarity it's better however not to use 'selected' but use field 'value' as is used to set default values for the other field types.
Only maximum 1 choice may have selected true.",
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"parent": {
"description": "Value of the parent choice item. Can be used to build hierarchical choice trees."
}
},
"required": [
"value",
"text"
]
}
}
}
Last updated
Was this helpful?