-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
106 lines (106 loc) · 3.43 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.flippercloud.io/expressions/schema.json",
"title": "Expression",
"description": "An expression can be a Constant or a Function",
"anyOf": [
{ "$ref": "#/definitions/constant" },
{ "$ref": "#/definitions/function" }
],
"definitions": {
"constant": {
"title": "Constant",
"description": "A constant value can be a string, number or boolean",
"anyOf": [
{
"title": "String",
"type": "string"
},
{
"title": "Number",
"type": "number"
},
{
"title": "Boolean",
"type": "boolean",
"enum": [true, false]
},
{
"type": "null"
}
]
},
"function": {
"title": "Function",
"description": "A function is an object with a single property that is the name of the function and the value is the arguments to the function",
"type": "object",
"maxProperties": 1,
"minProperties": 1,
"properties": {
"Add": { "$ref": "Add.schema.json" },
"All": { "$ref": "All.schema.json" },
"Any": { "$ref": "Any.schema.json" },
"Boolean": { "$ref": "Boolean.schema.json" },
"Divide": { "$ref": "Divide.schema.json" },
"Duration": { "$ref": "Duration.schema.json" },
"Equal": { "$ref": "Equal.schema.json" },
"GreaterThan": { "$ref": "GreaterThan.schema.json" },
"GreaterThanOrEqualTo": { "$ref": "GreaterThanOrEqualTo.schema.json" },
"LessThan": { "$ref": "LessThan.schema.json" },
"LessThanOrEqualTo": { "$ref": "LessThanOrEqualTo.schema.json" },
"Max": { "$ref": "Max.schema.json" },
"Min": { "$ref": "Min.schema.json" },
"Multiply": { "$ref": "Multiply.schema.json" },
"NotEqual": { "$ref": "NotEqual.schema.json" },
"Now": { "$ref": "Now.schema.json" },
"Number": { "$ref": "Number.schema.json" },
"Percentage": { "$ref": "Percentage.schema.json" },
"PercentageOfActors": { "$ref": "PercentageOfActors.schema.json" },
"Property": { "$ref": "Property.schema.json" },
"Random": { "$ref": "Random.schema.json" },
"String": { "$ref": "String.schema.json" },
"Subtract": { "$ref": "Subtract.schema.json" },
"Time": { "$ref": "Time.schema.json" }
},
"additionalProperties": false
},
"string": {
"title": "String",
"description": "A constant string value or a function that returns a string",
"anyOf": [
{ "type": "string" },
{ "$ref": "#/definitions/function" }
]
},
"number": {
"title": "Number",
"description": "A constant numeric value or a function that returns a number",
"anyOf": [
{ "type": "number" },
{ "$ref": "#/definitions/function" }
]
},
"arguments-n": {
"description": "An array of expressions",
"type": "array",
"items": { "$ref": "#" },
"minItems": 0
},
"operation": {
"title": "Operation",
"description": "An array with exactly two expressions",
"category": "Condition",
"type": "array",
"items": { "$ref": "#" },
"minItems": 2,
"maxItems": 2
},
"argument": {
"description": "An array with exactly one expression",
"type": "array",
"items": { "$ref": "#" },
"minItems": 1,
"maxItems": 1
}
}
}