Schema URL

Type: object

Defines flags for use in flagd, including typed variants and rules

Properties

flags object

Definitions

flag object

Base object for all flags

state string required

Indicates whether the flag is functional. Disabled flags are treated as if they don't exist

Values: "ENABLED" "DISABLED"
defaultVariant string required

The variant to serve if no dynamic targeting applies

targeting object

JsonLogic expressions to be used for dynamic evaluation. The "context" is passed as the data. Rules must resolve one of the defined variants, or the "defaultVariant" will be used.

booleanVariants object
variants object
Default:
{
  "on": true,
  "off": false
}
stringVariants object
variants object
numberVariants object
variants object
objectVariants object
variants object
objectFlag
booleanFlag
stringFlag
numberFlag