From eb41663455381b6aaa8276f8890332ecff024301 Mon Sep 17 00:00:00 2001 From: Simon Keen Date: Wed, 31 Aug 2022 15:41:20 +0100 Subject: [PATCH 1/2] Corrected schema of flags --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index da4cff8..25c7295 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can then add the **override** panel to your app and turn individual features The flag data that drives the feature flag service is a json format. Below is an example: ```json [ - { "key": "...", "active": "...", "name": "...", "description": "..." }, + { "key": "...", "environments": ["..."], "name": "...", "description": "..." }, ... ] ``` @@ -35,8 +35,8 @@ The flag data that drives the feature flag service is a json format. Below is an Unique key that is used from the markup to resolve whether a flag is active or not. - active - Boolean value for enabling/disabling the feature + environments + An object containing properties named after environment names with a true/false value for enabling/disabling the feature per environment name @@ -72,7 +72,7 @@ var myApp = angular.module('app', ['feature-flags']); myApp.config(function(featureFlagsProvider) { featureFlagsProvider.setInitialFlags([ - { "key": "...", "active": "...", "name": "...", "description": "..." }, + { "key": "...", "environments": {"...": true}, "name": "...", "description": "..." }, ]); }); ``` From 0194b873693d4cb26598fb941b5c448d392caee6 Mon Sep 17 00:00:00 2001 From: Simon Keen Date: Wed, 31 Aug 2022 15:52:43 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25c7295..55c7b85 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can then add the **override** panel to your app and turn individual features The flag data that drives the feature flag service is a json format. Below is an example: ```json [ - { "key": "...", "environments": ["..."], "name": "...", "description": "..." }, + { "key": "...", "environments": {"...": true}, "name": "...", "description": "..." }, ... ] ```