diff --git a/src/Cli/Commands/EntityOptions.cs b/src/Cli/Commands/EntityOptions.cs index 3b2b77d9b2..fc423337a2 100644 --- a/src/Cli/Commands/EntityOptions.cs +++ b/src/Cli/Commands/EntityOptions.cs @@ -83,13 +83,13 @@ public EntityOptions( [Option("rest", Required = false, HelpText = "Route for rest api.")] public string? RestRoute { get; } - [Option("rest.methods", Required = false, Separator = ',', HelpText = "HTTP actions to be supported for stored procedure. Specify the actions as a comma separated list. Valid HTTP actions are : [GET, POST, PUT, PATCH, DELETE]")] + [Option("rest.methods", Required = false, Separator = ',', HelpText = "HTTP actions to be supported for stored procedure. Specify the actions as a comma separated list. Valid HTTP actions are: [get, post, put, patch, delete]")] public IEnumerable? RestMethodsForStoredProcedure { get; } [Option("graphql", Required = false, HelpText = "Type of graphQL.")] public string? GraphQLType { get; } - [Option("graphql.operation", Required = false, HelpText = $"GraphQL operation to be supported for stored procedure. Valid operations are : [Query, Mutation] ")] + [Option("graphql.operation", Required = false, HelpText = "GraphQL operation to be supported for stored procedure. Valid operations are: [query, mutation]")] public string? GraphQLOperationForStoredProcedure { get; } [Option("fields.include", Required = false, Separator = ',', HelpText = "Fields that are allowed access to permission.")] diff --git a/src/Cli/Commands/InitOptions.cs b/src/Cli/Commands/InitOptions.cs index b44fd8d15e..0d3f8f7824 100644 --- a/src/Cli/Commands/InitOptions.cs +++ b/src/Cli/Commands/InitOptions.cs @@ -90,7 +90,7 @@ public InitOptions( [Option("set-session-context", Default = false, Required = false, HelpText = "Enable sending data to MsSql using session context.")] public bool SetSessionContext { get; } - [Option("host-mode", Default = HostMode.Production, Required = false, HelpText = "Specify the Host mode - Development or Production")] + [Option("host-mode", Default = HostMode.Production, Required = false, HelpText = "Specify the Host mode - development or production")] public HostMode HostMode { get; } [Option("cors-origin", Separator = ',', Required = false, HelpText = "Specify the list of allowed origins.")] diff --git a/src/Cli/Utils.cs b/src/Cli/Utils.cs index c1ff7f2a99..4263728405 100644 --- a/src/Cli/Utils.cs +++ b/src/Cli/Utils.cs @@ -602,7 +602,7 @@ public static bool TryConvertRestMethodNameToRestMethod(string? method, out Supp { if (!Enum.TryParse(method, ignoreCase: true, out restMethod)) { - _logger.LogError("Invalid REST Method. Supported methods are {restMethods}.", string.Join(", ", Enum.GetNames())); + _logger.LogError("Invalid REST Method. Supported methods are {restMethods}.", string.Join(", ", Enum.GetNames().Select(n => n.ToLowerInvariant()))); return false; } @@ -652,8 +652,8 @@ public static bool TryConvertGraphQLOperationNameToGraphQLOperation(string? oper { _logger.LogError( "Invalid GraphQL Operation. Supported operations are {queryName} and {mutationName}.", - GraphQLOperation.Query, - GraphQLOperation.Mutation); + nameof(GraphQLOperation.Query).ToLowerInvariant(), + nameof(GraphQLOperation.Mutation).ToLowerInvariant()); return false; }