Skip to content

Conversation

@amerjusupovic
Copy link
Contributor

@amerjusupovic amerjusupovic commented Mar 5, 2024

Currently, the provider incorrectly expects the string type for a variant's configuration value within a feature flag. This PR allows the provider to correctly handle all possible values for configuration_value.

Expected allowed values:

{
	"id": "ExampleFlag",
	"description": "",
	"enabled": true,
	"conditions": {
		"client_filters": []
	},
	"variants": [
		{
			"name": "NumberValue",
			"configuration_value": 1
		},
		{
			"name": "StringValue",
			"configuration_value": "1"
		},
		{
			"name": "ObjectValue",
			"configuration_value": {
                                "Key1": "Value1"
                        }
		},
		{
			"name": "ArrayValue",
			"configuration_value": ["1"]
		},
		{
			"name": "BooleanValue",
			"configuration_value": true
		},
		{
			"name": "NullValue",
			"configuration_value": null
		}
	]
}

Currently allowed values:

{
	"id": "ExampleFlag",
	"description": "",
	"enabled": true,
	"conditions": {
		"client_filters": []
	},
	"variants": [
		{
			"name": "StringValue",
			"configuration_value": "1"
		},
		{
			"name": "NullValue",
			"configuration_value": null
		}
	]
}

@jimmyca15
Copy link
Member

What's the bug, no PR description no issue linked

@amerjusupovic
Copy link
Contributor Author

What's the bug, no PR description no issue linked

My fault, let me add a description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants