You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Why make this change?
Different users of dataapi builder may have different ways in which they
want to load in runtimeconfig. For example: There is a scenario where
one might want to create the runtimeconfig object dynamically without
having a runtime json ready.
## What is this change?
- Summary of how your changes work to give reviewers context of your
intent.
In this pr, we create an abstract class BaseRunTimeConfigLoader that has
certain common methods that all derived classes can use. The main
TryLoadconfig method will be implemented differently by different
classes. The RunTimeConfigProvider by dab loads config from the
filesystem. Depending on use case this can be done differently by
different consumers.
- Also made some name simplifications in test files.
## How was this tested?
- [x] Integration Tests
yes
- [x] Unit Tests
yes
---------
Co-authored-by: Aaron Powell <me@aaron-powell.com>
Copy file name to clipboardExpand all lines: src/Cli.Tests/UtilsTests.cs
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -107,8 +107,8 @@ public void ConstructGraphQLOptionsWithSingularAndPluralWillSetSingularAndPlural
107
107
[DataTestMethod]
108
108
[DataRow("","my-config.json","my-config.json",DisplayName="user provided the config file and environment variable was not set.")]
109
109
[DataRow("Test","my-config.json","my-config.json",DisplayName="user provided the config file and environment variable was set.")]
110
-
[DataRow("Test",null,$"{RuntimeConfigLoader.CONFIGFILE_NAME}.Test{RuntimeConfigLoader.CONFIG_EXTENSION}",DisplayName="config not provided, but environment variable was set.")]
111
-
[DataRow("",null,$"{RuntimeConfigLoader.CONFIGFILE_NAME}{RuntimeConfigLoader.CONFIG_EXTENSION}",DisplayName="neither config was provided, nor environment variable was set.")]
110
+
[DataRow("Test",null,$"{CONFIGFILE_NAME}.Test{CONFIG_EXTENSION}",DisplayName="config not provided, but environment variable was set.")]
111
+
[DataRow("",null,$"{CONFIGFILE_NAME}{CONFIG_EXTENSION}",DisplayName="neither config was provided, nor environment variable was set.")]
Copy file name to clipboardExpand all lines: src/Cli/Commands/UpdateOptions.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ public UpdateOptions(
96
96
[Option('m',"map",Separator=',',Required=false,HelpText="Specify mappings between database fields and GraphQL and REST fields. format: --map \"backendName1:exposedName1,backendName2:exposedName2,...\".")]
_logger.LogInformation("The environment variable {variableName} has a value of {variableValue}",RuntimeConfigLoader.RUNTIME_ENVIRONMENT_VAR_NAME,environmentValue);
_logger.LogInformation("The environment variable {variableName} has a value of {variableValue}",FileSystemRuntimeConfigLoader.RUNTIME_ENVIRONMENT_VAR_NAME,environmentValue);
0 commit comments