Skip to content

Commit

Permalink
chore: update public schema (open-feature#1284)
Browse files Browse the repository at this point in the history
Update publicly served schema (flagd.dev)

Specifically this supports
[enhancements](open-feature#1266) from
@colebaileygit

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
  • Loading branch information
toddbaert authored Apr 16, 2024
1 parent 584a469 commit 06584a7
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions docs/schema/v0/targeting.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,6 @@
}
}
},
"ifRule": {
"type": "object",
"additionalProperties": false,
"properties": {
"if": {
"title": "If Operator",
"description": "The if statement takes 1-3 arguments: a condition (\"if\"), what to do if its true (\"then\", optional, defaults to returning true), and what to do if its false (\"else\", optional, defaults to returning false). Note that the form accepting more than 3 arguments (else-if) is not supported in flagd; use nesting instead.",
"type": "array",
"minItems": 1,
"maxItems": 3,
"items": {
"$ref": "#/$defs/args"
}
}
}
},
"binaryOrTernaryOp": {
"type": "array",
"minItems": 2,
Expand Down Expand Up @@ -190,6 +174,11 @@
"type": "object",
"additionalProperties": false,
"properties": {
"if": {
"title": "If Operator",
"description": "The if statement takes 1 or more arguments: a condition (\"if\"), what to do if its true (\"then\", optional, defaults to returning true), and what to do if its false (\"else\", optional, defaults to returning false). Note that the else condition can be used as an else-if statement by adding additional arguments.",
"$ref": "#/$defs/variadicOp"
},
"==": {
"title": "Lose Equality Operation",
"description": "Tests equality, with type coercion. Requires two arguments.",
Expand Down Expand Up @@ -486,7 +475,7 @@
"items": [
{
"description": "Bucketing value used in pseudorandom assignment; should be unique and stable for each subject of flag evaluation. Defaults to a concatenation of the flagKey and targetingKey.",
"$ref": "#/$defs/varRule"
"$ref": "#/$defs/anyRule"
},
{
"$ref": "#/$defs/fractionalWeightArg"
Expand Down Expand Up @@ -527,8 +516,9 @@
"reference": {
"additionalProperties": false,
"type": "object",
"properties": {
"$ref": {
"$comment": "patternProperties here is a bit of a hack to prevent this definition from being dereferenced early.",
"patternProperties": {
"^\\$ref$": {
"title": "Reference",
"description": "A reference to another entity, used for $evaluators (shared rules).",
"type": "string"
Expand Down Expand Up @@ -559,9 +549,6 @@
{
"$ref": "#/$defs/missingSomeRule"
},
{
"$ref": "#/$defs/ifRule"
},
{
"$ref": "#/$defs/binaryRule"
},
Expand Down

0 comments on commit 06584a7

Please sign in to comment.