RulesEngine/schema/workflowRules-schema.json

110 lines
2.0 KiB
JSON
Raw Normal View History

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