@@ -41,8 +41,8 @@ export class DefaultConfigurationSettingsConverter implements ConfigurationSetti
4141
4242 let featureFlagsConfigSettings = new Array < SetConfigurationSettingParam < MsFeatureFlagValue > > ( ) ;
4343 let foundMsFmSchema = false ;
44- let foundDotnetSchema = false ;
45- let dotnetSchemaFeatureManagementKeyWord = "" ;
44+ let foundDotnetFmSchema = false ;
45+ let dotnetFmSchemaKeyWord = "" ;
4646
4747 const featureFlagsDict : any = { } ;
4848
@@ -52,27 +52,27 @@ export class DefaultConfigurationSettingsConverter implements ConfigurationSetti
5252
5353 for ( let i = 0 ; i < Constants . FeatureManagementKeyWords . length - 1 ; i ++ ) {
5454 if ( Constants . FeatureManagementKeyWords [ i ] in config ) {
55- if ( foundDotnetSchema ) {
55+ if ( foundDotnetFmSchema ) {
5656 throw new ArgumentError (
5757 `Unable to proceed because data contains multiple sections corresponding to Feature Management. with the key, ${ Constants . FeatureManagementKeyWords [ i ] } `
5858 ) ;
5959 }
6060
61- foundDotnetSchema = true ;
62- dotnetSchemaFeatureManagementKeyWord = Constants . FeatureManagementKeyWords [ i ] ;
61+ foundDotnetFmSchema = true ;
62+ dotnetFmSchemaKeyWord = Constants . FeatureManagementKeyWords [ i ] ;
6363
64- const legacyFeatureManagementKey = dotnetSchemaFeatureManagementKeyWord as keyof object ;
65- featureFlagsDict [ legacyFeatureManagementKey ] = config [ legacyFeatureManagementKey ] ;
66- delete config [ legacyFeatureManagementKey ] ;
64+ const dotnetFmSchemaKey = dotnetFmSchemaKeyWord as keyof object ;
65+ featureFlagsDict [ dotnetFmSchemaKey ] = config [ dotnetFmSchemaKey ] ;
66+ delete config [ dotnetFmSchemaKey ] ;
6767 }
6868 }
6969
7070 const msFeatureManagementKeyWord = Constants . FeatureManagementKeyWords [ 3 ] ;
7171 if ( msFeatureManagementKeyWord in config ) {
72- if ( foundDotnetSchema &&
72+ if ( foundDotnetFmSchema &&
7373 Object . keys ( config [ msFeatureManagementKeyWord as keyof object ] ) . some ( key => key !== Constants . FeatureFlagsKeyWord ) ) {
7474 throw new ArgumentError (
75- `Unable to proceed because data contains an already defined dotnet schema section with the key, ${ dotnetSchemaFeatureManagementKeyWord } .`
75+ `Unable to proceed because data contains an already defined dotnet schema section with the key, ${ dotnetFmSchemaKeyWord } .`
7676 ) ;
7777 }
7878
@@ -81,18 +81,18 @@ export class DefaultConfigurationSettingsConverter implements ConfigurationSetti
8181 }
8282
8383 if ( Object . keys ( config [ msFeatureManagementKeyWord as keyof object ] ) . some ( key => key !== Constants . FeatureFlagsKeyWord ) ) {
84- foundDotnetSchema = true ;
85- dotnetSchemaFeatureManagementKeyWord = msFeatureManagementKeyWord ;
84+ foundDotnetFmSchema = true ;
85+ dotnetFmSchemaKeyWord = msFeatureManagementKeyWord ;
8686 }
8787
8888 const featureManagementKey = msFeatureManagementKeyWord as keyof object ;
8989 featureFlagsDict [ featureManagementKey ] = config [ featureManagementKey ] ;
9090 delete config [ featureManagementKey ] ;
9191 }
9292
93- if ( ( foundDotnetSchema || foundMsFmSchema ) && ! options . skipFeatureFlags ) {
93+ if ( ( foundDotnetFmSchema || foundMsFmSchema ) && ! options . skipFeatureFlags ) {
9494 const featureFlagConverter = new FeatureFlagConfigurationSettingsConverter (
95- dotnetSchemaFeatureManagementKeyWord ,
95+ dotnetFmSchemaKeyWord ,
9696 foundMsFmSchema
9797 ) ;
9898 featureFlagsConfigSettings = featureFlagConverter . Convert ( featureFlagsDict , options ) ;
@@ -167,16 +167,16 @@ export class DefaultConfigurationSettingsConverter implements ConfigurationSetti
167167 * @internal
168168 * */
169169class FeatureFlagConfigurationSettingsConverter implements ConfigurationSettingsConverter {
170- dotnetSchemaFeatureManagementKeyWord : string ;
170+ dotnetFmSchemaKeyWord : string ;
171171 foundMsFeatureManagement : boolean ;
172172 ajv : Ajv ;
173173
174- constructor ( dotnetSchemaFeatureManagementKeyWord : string , foundMsFeatureManagement : boolean ) {
175- this . dotnetSchemaFeatureManagementKeyWord = dotnetSchemaFeatureManagementKeyWord ;
174+ constructor ( dotnetFmSchemaKeyWord : string , foundMsFeatureManagement : boolean ) {
175+ this . dotnetFmSchemaKeyWord = dotnetFmSchemaKeyWord ;
176176 this . foundMsFeatureManagement = foundMsFeatureManagement ;
177177 this . ajv = new Ajv ( ) ;
178178
179- if ( ! this . dotnetSchemaFeatureManagementKeyWord && ! this . foundMsFeatureManagement ) {
179+ if ( ! this . dotnetFmSchemaKeyWord && ! this . foundMsFeatureManagement ) {
180180 throw new ArgumentError ( "No feature management was found" ) ;
181181 }
182182 }
@@ -191,11 +191,11 @@ class FeatureFlagConfigurationSettingsConverter implements ConfigurationSettings
191191 const settings = new Array < SetConfigurationSettingParam < MsFeatureFlagValue > > ( ) ;
192192 const featureFlags = new Array < MsFeatureFlagValue > ( ) ;
193193
194- if ( this . dotnetSchemaFeatureManagementKeyWord ) {
195- const dotnetSchemaFeatureFlags = this . getDotnetSchemaFeatureFlags ( config ) ;
194+ if ( this . dotnetFmSchemaKeyWord ) {
195+ const dotnetSchemaFeatureFlags = this . getDotnetFmSchemaFeatureFlags ( config ) ;
196196
197197 if ( dotnetSchemaFeatureFlags ) {
198- const featureManagementIndex = Constants . FeatureManagementKeyWords . indexOf ( this . dotnetSchemaFeatureManagementKeyWord ) ;
198+ const featureManagementIndex = Constants . FeatureManagementKeyWords . indexOf ( this . dotnetFmSchemaKeyWord ) ;
199199
200200 for ( const featureFlag in dotnetSchemaFeatureFlags ) {
201201 if ( ! this . validateFeatureName ( featureFlag ) ) {
@@ -385,7 +385,7 @@ class FeatureFlagConfigurationSettingsConverter implements ConfigurationSettings
385385 if ( featureFlag . display_name ) {
386386 parsedFeatureFlag . displayName = featureFlag . display_name ;
387387 }
388-
388+
389389 if ( featureFlag . conditions ?. requirement_type ) {
390390 parsedFeatureFlag . conditions . requirementType = featureFlag . conditions . requirement_type ;
391391 }
@@ -430,15 +430,15 @@ class FeatureFlagConfigurationSettingsConverter implements ConfigurationSettings
430430 return featureManagementSection [ Constants . FeatureFlagsKeyWord ] ;
431431 }
432432
433- private getDotnetSchemaFeatureFlags ( config : object ) : any {
433+ private getDotnetFmSchemaFeatureFlags ( config : object ) : any {
434434 const msFeatureManagementKeyWord = Constants . FeatureManagementKeyWords [ 3 ] ;
435- const featureManagementSection = config [ this . dotnetSchemaFeatureManagementKeyWord as keyof object ] ;
435+ const featureManagementSection = config [ this . dotnetFmSchemaKeyWord as keyof object ] ;
436436
437437 if ( typeof featureManagementSection !== "object" ) {
438- throw new ArgumentError ( `The ${ this . dotnetSchemaFeatureManagementKeyWord } section must be an object.` ) ;
438+ throw new ArgumentError ( `The ${ this . dotnetFmSchemaKeyWord } section must be an object.` ) ;
439439 }
440440
441- if ( this . dotnetSchemaFeatureManagementKeyWord === msFeatureManagementKeyWord ) { //dotnet schema might be nested within msFmSchema
441+ if ( this . dotnetFmSchemaKeyWord === msFeatureManagementKeyWord ) { //dotnet schema might be nested within msFmSchema
442442 const { feature_flags, ...dotnetSchemaFlags } = featureManagementSection as { [ key : string ] : any } ;
443443 if ( Object . keys ( dotnetSchemaFlags ) . length > 0 ) {
444444 return dotnetSchemaFlags ;
0 commit comments