Skip to content

Commit

Permalink
- fixes a bug where store name was not being passed because of naming…
Browse files Browse the repository at this point in the history
… conventions
  • Loading branch information
baywet committed Jun 7, 2021
1 parent c7dcad2 commit b77a0eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/kiota/KiotaHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static RootCommand GetRootCommand()
var descriptionOption = new Option("--openapi", "The path to the OpenAPI description file used to generate the code files.") {Argument = new Argument<string>(() => "openapi.yml")};
descriptionOption.AddAlias("-d");

var backingStoreOption = new Option("--backing-store", "The fully qualified name for the backing store class to use.") {Argument = new Argument<string>(() => string.Empty)};
var backingStoreOption = new Option("--backing-store", "The fully qualified name for the backing store class to use.") {Argument = new Argument<string>()};
backingStoreOption.AddAlias("-b");

var command = new RootCommand {
Expand All @@ -46,7 +46,7 @@ public static RootCommand GetRootCommand()
logLevelOption,
namespaceOption,
};
command.Handler = CommandHandler.Create<string, GenerationLanguage?, string, string, string, LogLevel, string>(async (output, language, openapi, store, classname, loglevel, namespacename) =>
command.Handler = CommandHandler.Create<string, GenerationLanguage?, string, string, string, LogLevel, string>(async (output, language, openapi, backingstore, classname, loglevel, namespacename) =>
{
if (!string.IsNullOrEmpty(output))
configuration.OutputPath = output;
Expand All @@ -58,7 +58,8 @@ public static RootCommand GetRootCommand()
configuration.ClientNamespaceName = namespacename;
if (language.HasValue)
configuration.Language = language.Value;
configuration.BackingStore = store;
if(!string.IsNullOrEmpty(backingstore))
configuration.BackingStore = backingstore;

#if DEBUG
loglevel = loglevel > LogLevel.Debug ? LogLevel.Debug : loglevel;
Expand Down

0 comments on commit b77a0eb

Please sign in to comment.