I am using .net core 3 to create configuration setting in App configuration. I was able to create a key-value in the configuration explorer using the following code snippet and some additional configuration in the link below
var client = new ConfigurationClient(_configuration.GetConnectionString("AppConnectionString"));
var settingToCreate = new ConfigurationSetting(model.Key, model.Value);
client.SetConfigurationSetting(settingToCreate);
I am currently working on creating a feature flag in feature manager pane of App Configuration using the same approach but providing the contenttype for featureflag as below.
var client = new ConfigurationClient(_configuration.GetConnectionString("AppConnectionString"));
var settingToCreate = new ConfigurationSetting(model.Key, model.Value);
settingToCreate.ContentType = "application/vnd.microsoft.appconfig.ff+json;charset=utf-8";
client.SetConfigurationSetting(settingToCreate);
The issue is it creates a feature flag but without a name, showing an error message as below configuration explorer
Please suggest any possible solutions. Thanks in advance!