Skip to content

Commit

Permalink
Merge branch 'main' into pmishra/1357-allow-max-message-size
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepbbl authored Jul 11, 2024
2 parents c09c5bd + 8f1dbba commit 30cbc38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
6 changes: 3 additions & 3 deletions docs/schema/v0/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$id": "https://flagd.dev/schema/v0/flags.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "flagd Flag Configuration",
"description": "Defines flags for use in flagd, including typed variants and rules",
"description": "Defines flags for use in flagd, including typed variants and rules.",
"type": "object",
"properties": {
"flags": {
Expand Down Expand Up @@ -46,7 +46,7 @@
"patternProperties": {
"^.{1,}$": {
"$comment": "this relative ref means that targeting.json MUST be in the same dir, or available on the same HTTP path",
"$ref": "./targeting.json#/definitions/targeting"
"$ref": "./targeting.json"
}
}
}
Expand All @@ -71,7 +71,7 @@
"type": "string"
},
"targeting": {
"$ref": "./targeting.json#/definitions/targeting"
"$ref": "./targeting.json"
}
},
"required": [
Expand Down
30 changes: 13 additions & 17 deletions docs/schema/v0/targeting.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@
"$id": "https://flagd.dev/schema/v0/targeting.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "flagd Targeting",
"description": "Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations.",
"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.",
"type": "object",
"definitions": {
"targeting": {
"title": "Targeting",
"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.",
"anyOf": [
{
"$comment": "we need this to support empty targeting",
"type": "object",
"additionalProperties": false,
"properties": {}
},
{
"$ref": "#/definitions/anyRule"
}
]
"anyOf": [
{
"$comment": "we need this to support empty targeting",
"type": "object",
"additionalProperties": false,
"properties": {}
},
{
"$ref": "#/definitions/anyRule"
}
],
"definitions": {
"primitive": {
"oneOf": [
{
Expand Down Expand Up @@ -462,7 +458,7 @@
"$comment": "if we remove the \"sum to 100\" restriction, update the descriptions below!",
"description": "Distribution for all possible variants, with their associated weighting out of 100.",
"type": "array",
"minItems": 2,
"minItems": 1,
"maxItems": 2,
"items": [
{
Expand Down

0 comments on commit 30cbc38

Please sign in to comment.