Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update public schema #1284

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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