Skip to content

Commit 270f290

Browse files
committed
$defs => definitions for draft 7
1 parent b8279c5 commit 270f290

22 files changed

+47
-39
lines changed

packages/expressions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To learn more about JSON Schema, read [Understanding JSON Schema](https://json-s
99
## Adding a new expression
1010

1111
1. Describe arguments by creating a new file in [`schemas/`](schemas/) named `NewName.schema.json`. You can copy an existing function that has similar semantics to get started.
12-
2. Add the new function in [`schemas/schema.json`](schemas/schema.json) to `$defs/function`.
12+
2. Add the new function in [`schemas/schema.json`](schemas/schema.json) to `definitions/function`.
1313
3. Create a new file in [`examples/`](./examples) named `NewName.json` with valid and invalid examples for the new function. See other examples for inspiration.
1414
4. Run `yarn test` in `packages/expressions` and ensure tests pass.
1515
5. Implement the function in [`lib/flipper/expressions/`](../../lib/flipper/expressions/).

packages/expressions/schemas/All.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
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-
"$ref": "schema.json#/$defs/arguments-n"
6+
"$ref": "schema.json#/definitions/arguments-n"
77
}

packages/expressions/schemas/Any.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"$id": "https://www.flippercloud.io/expressions/Any.schema.json",
44
"title": "Any",
55
"description": "Returns true if any of the expressions return true.",
6-
"$ref": "schema.json#/$defs/arguments-n"
6+
"$ref": "schema.json#/definitions/arguments-n"
77
}

packages/expressions/schemas/Boolean.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"$id": "https://www.flippercloud.io/expressions/Boolean.schema.json",
44
"title": "Boolean",
55
"description": "Cast a value to a boolean.",
6-
"$ref": "schema.json#/$defs/argument"
6+
"$ref": "schema.json#/definitions/argument"
77
}

packages/expressions/schemas/Duration.schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"description": "A period of time expressed as a number of seconds, minutes, hours, days, weeks, months, or years.",
66
"type": "array",
77
"items": [
8-
{ "$ref": "schema.json#/$defs/number" },
8+
{ "$ref": "schema.json#/definitions/number" },
99
{
1010
"anyOf": [
11-
{ "$ref": "#/$defs/unit" },
12-
{ "$ref": "schema.json#/$defs/function" }
11+
{ "$ref": "#/definitions/unit" },
12+
{ "$ref": "schema.json#/definitions/function" }
1313
]
1414
}
1515
],
1616
"minItems": 2,
1717
"maxItems": 2,
18-
"$defs": {
18+
"definitions": {
1919
"unit": {
2020
"type": "string",
2121
"enum": ["seconds", "minutes", "hours", "days", "weeks", "months", "years"],

packages/expressions/schemas/Equal.schema.json

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

packages/expressions/schemas/GreaterThan.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
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-
"$ref": "schema.json#/$defs/arguments-two"
6+
"$ref": "schema.json#/definitions/arguments-two"
77
}

packages/expressions/schemas/GreaterThanOrEqualTo.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
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-
"$ref": "schema.json#/$defs/arguments-two"
6+
"$ref": "schema.json#/definitions/arguments-two"
77
}

packages/expressions/schemas/LessThan.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"$id": "https://www.flippercloud.io/expressions/LessThan.schema.json",
44
"title": "LessThan",
55
"description": "Compare if the first argument is < the second argument.",
6-
"$ref": "schema.json#/$defs/arguments-two"
6+
"$ref": "schema.json#/definitions/arguments-two"
77
}

packages/expressions/schemas/LessThanOrEqualTo.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"$id": "https://www.flippercloud.io/expressions/LessThanOrEqualTo.schema.json",
44
"title": "LessThanOrEqualTo",
55
"description": "Compare if the first argument is < the second argument.",
6-
"$ref": "schema.json#/$defs/arguments-two"
6+
"$ref": "schema.json#/definitions/arguments-two"
77
}

0 commit comments

Comments
 (0)