0.2.0--targeting
shared| Type | object |
|---|---|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/flagd-flag-configuration/_shared/0.2.0--targeting.json |
| Parent schema | flagd-flag-configuration |
Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations.
Definitions
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.
Retrieve data from the provided data object.
Takes an array of data keys to search for (same format as var). Returns an array of any keys that are missing from the data object, or an empty array.
Takes a minimum number of data keys that are required, and an array of keys to search for (same format as var or missing). Returns an empty array if the minimum is met, or an array of the missing keys otherwise.
Any primitive JSONLogic operation with 2 operands.
Combine all the elements in an array into a single value, like adding up a list of numbers. Note, that inside the logic being used to reduce, var operations only have access to an object with a "current" and a "accumulator".
Operation applicable to 2 or more parameters.
A string representing a valid semantic version expression as per https://semver.org/.
Attribute matches a semantic version condition. Accepts "npm-style" range specifiers: "=", "!=", ">", "<", ">=", "<=", "~" (match minor version), "^" (match major version).
Distribution for all possible variants, with their associated weighting out of 100.
Deterministic, pseudorandom fractional distribution.
A reference to another entity, used for $evaluators (shared rules).