{
"$schema":"http://json-schema.org/draft-04/schema#",
"title":"Automation Template Definitions",
"description":"This schema is used for verification of JSON objects used for creation of Automation Templates.",
"oneOf":[
{
"type":"object",
"title":"Template",
"description":"Template JSON Definition",
"additionalProperties":false,
"required":[
"triggers",
"flow"
],
"properties":{
"name":{
"type":"string",
"title":"Template Name",
"description":"Short user friendly name of the template."
},
"uid":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Template UID",
"description":"An unique identifier of the template in scope of the Automation."
},
"tags":{
"type":"array",
"title":"Template Tags",
"description":"Non-hierarchical keywords or terms describing the template. They help to classify the templates and allow them to be found.",
"minItems":1,
"items":{
"type":"string",
"title":"Tag",
"description":"Keyword or term describing the template."
}
},
"description":{
"type":"string",
"title":"Template Description",
"description":"A brief description of what the template is and for what it is used."
},
"variables":{
"type":"array",
"title":"Variables",
"description":"Used to describe the variables of the template.",
"minItems":1,
"items":{
"type":"object",
"title":"Variable",
"description":"Metadata of the value for configuring the future rules created by the template.",
"additionalProperties":false,
"required":[
"id",
"type",
"classes"
],
"properties":{
"id":{
"pattern":"[a-zA-Z0-9._-]+",
"type":"string",
"title":"Variable Id",
"description":"Identifies uniquely the variable in scope of the template."
},
"type":{
"enum":[
"GENERIC",
"NUMERIC",
"ENUM",
"BEAN",
"ANY"
],
"title":"Variable Type",
"description":"Property declaring the data type of the value."
},
"classes":{
"type":"array",
"default":false,
"minItems":1,
"items":{
"type":"string"
},
"title":"Variable Classes",
"description":"Specifies the data classes of the value."
},
"namespace":{
"pattern":"[a-zA-Z0-9._-]+(\\/{1}[a-zA-Z0-9._-]+)*",
"type":"string",
"title":"Variable Namespace",
"description":"A string used to group variables together into logical blocks so that the UI can display them together."
},
"context":{
"pattern":"[a-zA-Z0-9._-]+",
"type":"string",
"title":"Variable Context",
"description":"Serves to determine how to treat the value of the variable."
},
"required":{
"type":"boolean",
"default":false,
"title":"Required",
"description":"Specifies whether the value is required."
},
"name":{
"type":"string",
"title":"Variable Name",
"description":"A human-readable name of the variable."
},
"description":{
"type":"string",
"title":"Variable Description",
"description":"A human-readable description of the variable."
},
"pattern":{
"type":"string",
"title":"Variable Pattern",
"description":"The regular expression for a text type."
},
"min":{
"type":"number",
"title":"Variable Minimum Allowed Value",
"description":"The minimal value for numeric types, or the minimal length of strings, or the minimal number of selected options."
},
"max":{
"type":"number",
"title":"Variable Maximum Allowed Value",
"description":"The maximal value for numeric types, or the maximal length of strings, or the maximal number of selected options."
},
"step":{
"type":"number",
"title":"Variable Step",
"description":"The value granularity for a numeric value"
},
"options":{
"type":"array",
"title":"Variable Options",
"description":"List of definitions of the parameter for static selection.",
"items":{
"type":"string"
}
}
}
}
},
"triggers":{
"type":"array",
"minItems":1,
"title":"Trigger Instructions",
"description":"Contains definitions of the Trigger Instructions of the template.",
"items":{
"type":"object",
"title":"Trigger Instruction",
"description":"Defines the fact which triggers the future rules execution.",
"additionalProperties":false,
"required":[
"id",
"handlerUID"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Trigger ID",
"description":"Identifies uniquely the trigger in scope of the template."
},
"name":{
"type":"string",
"title":"Trigger Name",
"description":"Short human-readable name of the trigger."
},
"description":{
"type":"string",
"title":"Trigger Description",
"description":"A brief description of what the trigger is and for what it is used."
},
"handlerUID":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Trigger Handler Factory UID",
"description":"Identifies the handler factory used for creation of the trigger handler."
},
"bindings":{
"type":"array",
"minItems":1,
"title":"Trigger Input Bindings",
"description":"Used to define the sources for the input values of the trigger handler.",
"items":{
"type":"object",
"title":"Trigger Input Binding",
"description":"Defines the source from which an instruction input data should come from.",
"additionalProperties":false,
"required":[
"id",
"type",
"source"
],
"enum":[
"CONSTANT",
"INSTRUCTION",
"SYSTEM",
"VARIABLE"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Binding ID",
"description":"Identifies uniquely the binding in scope of the instruction."
},
"type":{
"type":"string",
"title":"Binding Type",
"description":"Defines the type of the source that will feed with value the binding."
},
"source":{
"type":"string",
"title":"Binding Source",
"description":"Defines the source that will feed with value the binding."
}
}
}
}
}
}
},
"flow":{
"type":"array",
"minItems":1,
"title":"Instructions",
"description":"Contains definitions of Action and Condition Instructions of the template.",
"items":{
"type":"object",
"title":"Instruction",
"description":"Defines a Condition to be checked or an Action which has to be executed by the template.",
"additionalProperties":false,
"required":[
"id",
"handlerUID"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Instruction ID",
"description":"Identifies uniquely the Instruction in scope of the template."
},
"name":{
"type":"string",
"title":"Instruction Name",
"description":"Short user friendly name of the Instruction."
},
"description":{
"type":"string",
"title":"Instruction Description",
"description":"A brief description of what the Instruction is and for what it is used."
},
"handlerUID":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Instruction Handler UID",
"description":"Identifies the Handler used for processing the Instruction."
},
"bindings":{
"type":"array",
"minItems":1,
"title":"Instruction Input Bindings",
"description":"Used to define the sources for the input values of the handler.",
"items":{
"type":"object",
"title":"Instruction Input Binding",
"description":"Defines the source from which an instruction input data should come from.",
"additionalProperties":false,
"required":[
"id",
"type",
"source"
],
"enum":[
"CONSTANT",
"INSTRUCTION",
"SYSTEM",
"VARIABLE"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Binding ID",
"description":"Identifies uniquely the binding in scope of the instruction."
},
"type":{
"type":"string",
"title":"Binding Type",
"description":"Defines the type of the source that will feed with value the binding."
},
"source":{
"type":"string",
"title":"Binding Source",
"description":"Defines the source that will feed with value the binding."
}
}
}
}
}
}
}
}
},
{
"type":"array",
"minItems":1,
"items":{
"type":"object",
"title":"Template",
"description":"Template JSON Definition",
"additionalProperties":false,
"required":[
"triggers",
"flow"
],
"properties":{
"name":{
"type":"string",
"title":"Template name",
"description":"Short user friendly name of the Template."
},
"uid":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Template UID",
"description":"An unique identifier of the template in scope of the Automation."
},
"tags":{
"type":"array",
"title":"Template Tags",
"description":"Non-hierarchical keywords or terms describing the template. They help to classify the templates and allow them to be found.",
"minItems":1,
"items":{
"type":"string",
"title":"Tag",
"description":"Keyword or term describing the template."
}
},
"description":{
"type":"string",
"title":"Template Description",
"description":"A brief description of what the template is and for what it is used."
},
"variables":{
"type":"array",
"title":"Variables",
"description":"Used to describe the variables of the template.",
"minItems":1,
"items":{
"type":"object",
"title":"Variable",
"description":"Metadata of the value for configuring the future rules created by the template.",
"additionalProperties":false,
"required":[
"id",
"type",
"classes"
],
"properties":{
"id":{
"pattern":"[a-zA-Z0-9._-]+",
"type":"string",
"title":"Variable Id",
"description":"Identifies uniquely the variable in scope of the template."
},
"type":{
"enum":[
"GENERIC",
"NUMERIC",
"ENUM",
"BEAN",
"ANY"
],
"title":"Variable Type",
"description":"Property declaring the data type of the value."
},
"classes":{
"type":"array",
"default":false,
"minItems":1,
"items":{
"type":"string"
},
"title":"Variable Classes",
"description":"Specifies the data classes of the value."
},
"namespace":{
"pattern":"[a-zA-Z0-9._-]+(\\/{1}[a-zA-Z0-9._-]+)*",
"type":"string",
"title":"Variable Namespace",
"description":"A string used to group variables together into logical blocks so that the UI can display them together."
},
"context":{
"pattern":"[a-zA-Z0-9._-]+",
"type":"string",
"title":"Variable Context",
"description":"Serves to determine how to treat the value of the variable."
},
"required":{
"type":"boolean",
"default":false,
"title":"Required",
"description":"Specifies whether the value is required."
},
"name":{
"type":"string",
"title":"Variable Name",
"description":"A human-readable name of the variable."
},
"description":{
"type":"string",
"title":"Variable Description",
"description":"A human-readable description of the variable."
},
"pattern":{
"type":"string",
"title":"Variable Pattern",
"description":"The regular expression for a text type."
},
"min":{
"type":"number",
"title":"Variable Minimum Allowed Value",
"description":"The minimal value for numeric types, or the minimal length of strings, or the minimal number of selected options."
},
"max":{
"type":"number",
"title":"Variable Maximum Allowed Value",
"description":"The maximal value for numeric types, or the maximal length of strings, or the maximal number of selected options."
},
"step":{
"type":"number",
"title":"Variable Step",
"description":"The value granularity for a numeric value"
},
"options":{
"type":"array",
"title":"Variable Options",
"description":"List of definitions of the parameter for static selection.",
"items":{
"type":"string"
}
}
}
}
},
"triggers":{
"type":"array",
"minItems":1,
"title":"Trigger Instructions",
"description":"Contains definitions of the Trigger Instructions of the Template.",
"items":{
"type":"object",
"title":"Trigger Instruction",
"description":"Defines the fact which triggers the future rules execution.",
"additionalProperties":false,
"required":[
"id",
"handlerUID"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Trigger ID",
"description":"Identifies uniquely the trigger in scope of the template."
},
"name":{
"type":"string",
"title":"Trigger Name",
"description":"Short human-readable name of the trigger."
},
"description":{
"type":"string",
"title":"Trigger Description",
"description":"A brief description of what the trigger is and for what it is used."
},
"handlerUID":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Trigger Handler Factory UID",
"description":"Identifies the handler factory used for creation of the trigger handler."
},
"bindings":{
"type":"array",
"minItems":1,
"title":"Trigger Input Bindings",
"description":"Used to define the sources for the input values of the trigger handler.",
"items":{
"type":"object",
"title":"Trigger Input Binding",
"description":"Defines the source from which an instruction input data should come from.",
"additionalProperties":false,
"required":[
"id",
"type",
"source"
],
"enum":[
"CONSTANT",
"INSTRUCTION",
"SYSTEM",
"VARIABLE"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Binding ID",
"description":"Identifies uniquely the binding in scope of the instruction."
},
"type":{
"type":"string",
"title":"Binding Type",
"description":"Defines the type of the source that will feed with value the binding."
},
"source":{
"type":"string",
"title":"Binding Source",
"description":"Defines the source that will feed with value the binding."
}
}
}
}
}
}
},
"flow":{
"type":"array",
"minItems":1,
"title":"Instructions",
"description":"Contains definitions of Action and Condition Instructions of the template.",
"items":{
"type":"object",
"title":"Instruction",
"description":"Defines a Condition to be checked or an Action which has to be executed by the template.",
"additionalProperties":false,
"required":[
"id",
"handlerUID"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Instruction ID",
"description":"Identifies uniquely the Instruction in scope of the template."
},
"name":{
"type":"string",
"title":"Instruction Name",
"description":"Short user friendly name of the Instruction."
},
"description":{
"type":"string",
"title":"Instruction Description",
"description":"A brief description of what the Instruction is and for what it is used."
},
"handlerUID":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Instruction Handler UID",
"description":"Identifies the Handler used for processing the Instruction."
},
"bindings":{
"type":"array",
"minItems":1,
"title":"Instruction Input Bindings",
"description":"Used to define the sources for the input values of the handler.",
"items":{
"type":"object",
"title":"Instruction Input Binding",
"description":"Defines the source from which an instruction input data should come from.",
"additionalProperties":false,
"required":[
"id",
"type",
"source"
],
"enum":[
"CONSTANT",
"INSTRUCTION",
"SYSTEM",
"VARIABLE"
],
"properties":{
"id":{
"type":"string",
"pattern":"[a-zA-Z0-9._-]+",
"title":"Binding ID",
"description":"Identifies uniquely the binding in scope of the instruction."
},
"type":{
"type":"string",
"title":"Binding Type",
"description":"Defines the type of the source that will feed with value the binding."
},
"source":{
"type":"string",
"title":"Binding Source",
"description":"Defines the source that will feed with value the binding."
}
}
}
}
}
}
}
}
}
}
]
}