Skip to content

Commit dca7134

Browse files
committed
Add category to schema
1 parent ac0c30e commit dca7134

24 files changed

+51
-22
lines changed

lib/schemas.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const ajv = new Ajv({
1414
strict: true
1515
})
1616
addFormats(ajv)
17-
ajv.addKeyword('operator')
17+
ajv.addKeyword('symbol')
18+
ajv.addKeyword('category')
1819

1920
// Delegate property access to the schema definition
2021
const DelegateToDefinition = {

schemas/Add.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"$id": "https://www.flippercloud.io/expressions/Add.schema.json",
44
"title": "Add",
55
"description": "Add two values",
6-
"operator": "+",
6+
"symbol": "+",
7+
"category": "Operation",
78
"$ref": "schema.json#/definitions/operation"
89
}

schemas/All.schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"$id": "https://www.flippercloud.io/expressions/All.schema.json",
44
"title": "All",
55
"description": "Returns true if all of the expressions return true.",
6+
"category": "Group",
7+
"symbol": "&",
68
"$ref": "schema.json#/definitions/arguments-n"
79
}

schemas/Any.schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://www.flippercloud.io/expressions/Any.schema.json",
44
"title": "Any",
5+
"category": "Group",
6+
"symbol": "||",
57
"description": "Returns true if any of the expressions return true.",
68
"$ref": "schema.json#/definitions/arguments-n"
79
}

schemas/Boolean.schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://www.flippercloud.io/expressions/Boolean.schema.json",
44
"title": "Boolean",
5+
"category": "Cast",
6+
"symbol": "!!",
57
"description": "Cast a value to a boolean.",
68
"$ref": "schema.json#/definitions/argument"
79
}

schemas/Divide.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"$id": "https://www.flippercloud.io/expressions/Divide.schema.json",
44
"title": "Divide",
55
"description": "Divide two values",
6-
"operator": "/",
6+
"symbol": "÷",
7+
"category": "Operation",
78
"$ref": "schema.json#/definitions/operation"
89
}

schemas/Duration.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"title": "Duration",
55
"description": "A period of time expressed as a number of seconds, minutes, hours, days, weeks, months, or years.",
66
"type": "array",
7+
"category": "Value",
78
"items": [
89
{ "$ref": "schema.json#/definitions/number" },
910
{

schemas/Equal.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"$id": "https://www.flippercloud.io/expressions/Equal.schema.json",
44
"title": "Equal",
55
"description": "Compare two values for equality",
6-
"operator": "==",
6+
"symbol": "=",
77
"$ref": "schema.json#/definitions/operation"
88
}

schemas/GreaterThan.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"$id": "https://www.flippercloud.io/expressions/GreaterThan.schema.json",
44
"title": "GreaterThan",
55
"description": "Compare if the first argument is > the second argument.",
6-
"operator": ">",
6+
"symbol": ">",
77
"$ref": "schema.json#/definitions/operation"
88
}

schemas/GreaterThanOrEqualTo.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"$id": "https://www.flippercloud.io/expressions/GreaterThanOrEqualTo.schema.json",
44
"title": "GreaterThanOrEqualTo",
55
"description": "Compare if the first argument is >= the second argument.",
6-
"operator": ">=",
6+
"symbol": "",
77
"$ref": "schema.json#/definitions/operation"
88
}

0 commit comments

Comments
 (0)