diff --git a/config/samples/example_flags.flagd.json b/config/samples/example_flags.flagd.json index 0314b5eda..72974289c 100644 --- a/config/samples/example_flags.flagd.json +++ b/config/samples/example_flags.flagd.json @@ -122,6 +122,29 @@ }, null ] } + }, + "targetedFlag": { + "variants": { + "first": "AAA", + "second": "BBB", + "third": "CCC" + }, + "defaultVariant": "first", + "state": "ENABLED", + "targeting": { + "if": [{ + "in": ["@openfeature.dev", { + "var": "email" + }] + }, "second", + { + "in": ["Chrome", { + "var": "userAgent" + }] + }, "third", + null + ] + } } }, "$evaluators": { diff --git a/config/samples/example_flags.flagd.yaml b/config/samples/example_flags.flagd.yaml index dac0f4586..13fea0d1f 100644 --- a/config/samples/example_flags.flagd.yaml +++ b/config/samples/example_flags.flagd.yaml @@ -80,9 +80,27 @@ flags: - - yellow - 25 - null + targetedFlag: + variants: + first: "AAA" + second: "BBB" + third: "CCC" + defaultVariant: first + state: ENABLED + targeting: +if: +- in: + - "@openfeature.dev" + - var: email +- second +- in: + - Chrome + - var: userAgent +- third +- "$evaluators": emailWithFaas: in: - "@faas.com" - var: - - email \ No newline at end of file + - email