Skip to content

Commit c87e2b1

Browse files
authored
Merge branch 'main' into pmishra/1357-allow-max-message-size
2 parents eec5841 + 8f1dbba commit c87e2b1

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

docs/schema/v0/flags.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$id": "https://flagd.dev/schema/v0/flags.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"title": "flagd Flag Configuration",
5-
"description": "Defines flags for use in flagd, including typed variants and rules",
5+
"description": "Defines flags for use in flagd, including typed variants and rules.",
66
"type": "object",
77
"properties": {
88
"flags": {
@@ -46,7 +46,7 @@
4646
"patternProperties": {
4747
"^.{1,}$": {
4848
"$comment": "this relative ref means that targeting.json MUST be in the same dir, or available on the same HTTP path",
49-
"$ref": "./targeting.json#/definitions/targeting"
49+
"$ref": "./targeting.json"
5050
}
5151
}
5252
}
@@ -71,7 +71,7 @@
7171
"type": "string"
7272
},
7373
"targeting": {
74-
"$ref": "./targeting.json#/definitions/targeting"
74+
"$ref": "./targeting.json"
7575
}
7676
},
7777
"required": [

docs/schema/v0/targeting.json

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,20 @@
22
"$id": "https://flagd.dev/schema/v0/targeting.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"title": "flagd Targeting",
5-
"description": "Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations.",
5+
"description": "Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations. Note that this schema applies to top-level objects; no additional properties are supported, including \"$schema\", which means built-in JSON-schema support is not possible in editors. Please use flags.json (which imports this schema) for a rich editor experience.",
66
"type": "object",
7-
"definitions": {
8-
"targeting": {
9-
"title": "Targeting",
10-
"description": "An expression returning a value which is coerced to a string to be used as a targeting key, or null (to fall back to defaultVariant). If targeting returns a value which is not a variant key, it's considered an error.",
11-
"anyOf": [
12-
{
13-
"$comment": "we need this to support empty targeting",
14-
"type": "object",
15-
"additionalProperties": false,
16-
"properties": {}
17-
},
18-
{
19-
"$ref": "#/definitions/anyRule"
20-
}
21-
]
7+
"anyOf": [
8+
{
9+
"$comment": "we need this to support empty targeting",
10+
"type": "object",
11+
"additionalProperties": false,
12+
"properties": {}
2213
},
14+
{
15+
"$ref": "#/definitions/anyRule"
16+
}
17+
],
18+
"definitions": {
2319
"primitive": {
2420
"oneOf": [
2521
{
@@ -462,7 +458,7 @@
462458
"$comment": "if we remove the \"sum to 100\" restriction, update the descriptions below!",
463459
"description": "Distribution for all possible variants, with their associated weighting out of 100.",
464460
"type": "array",
465-
"minItems": 2,
461+
"minItems": 1,
466462
"maxItems": 2,
467463
"items": [
468464
{

0 commit comments

Comments
 (0)