RulesEngine/schema/workflowRules-schema.json

110 lines
2.0 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Rule": {
"title": "Rule",
"properties": {
"RuleName": {
"type": "string"
},
"Operator": {
"enum": [
"And",
"AndAlso",
"Or",
"OrElse"
]
},
"ErrorMessage": {
"type": "string"
},
"ErrorType": {
"enum": [
"Warning",
"Error"
]
},
"SuccessEvent": {
"type": "string"
},
"Rules": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/LeafRule"
},
{
"$ref": "#/definitions/Rule"
}
]
}
}
},
"required": [
"RuleName",
"Operator",
"Rules"
],
"type": "object"
},
"LeafRule": {
"title": "Leaf Rule",
"type": "object",
"required": [
"RuleName",
"Expression",
"RuleExpressionType"
],
"properties": {
"RuleName": {
"type": "string"
},
"Expression": {
"type": "string"
},
"RuleExpressionType": {
"enum": [
"LambdaExpression"
]
},
"ErrorMessage": {
"type": "string"
},
"ErrorType": {
"enum": [
"Warning",
"Error"
]
},
"SuccessEvent": {
"type": "string"
}
}
}
},
"properties": {
"WorkFlowName": {
"type": "string"
},
"Rules": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/LeafRule"
},
{
"$ref": "#/definitions/Rule"
}
]
}
}
},
"required": [
"WorkFlowName",
"Rules"
],
"type": "object"
}