From 6a039cef875caae61ea6c65799f3b6dc3863d131 Mon Sep 17 00:00:00 2001 From: Adam Gardner Date: Thu, 9 Mar 2023 05:58:01 +1000 Subject: [PATCH] chore: Add targeted Flag to example config (#467) Signed-off-by: Adam Gardner Co-authored-by: Michael Beemer --- config/samples/example_flags.flagd.json | 23 +++++++++++++++++++++++ config/samples/example_flags.flagd.yaml | 20 +++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) 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