lowercase CLI enum values in HelpText and error messages (Group 3)#3444
Open
souvikghosh04 wants to merge 3 commits intomainfrom
Open
lowercase CLI enum values in HelpText and error messages (Group 3)#3444souvikghosh04 wants to merge 3 commits intomainfrom
souvikghosh04 wants to merge 3 commits intomainfrom
Conversation
Fix 4 issues where CLI help text and error messages showed PascalCase or uppercase enum values instead of the lowercase values required by the JSON schema: InitOptions.cs: - host-mode HelpText: 'Development or Production' -> 'development or production' (#3361) EntityOptions.cs: - rest.methods HelpText: '[GET, POST, ...]' -> '[get, post, ...]' (#3362) - graphql.operation HelpText: '[Query, Mutation]' -> '[query, mutation]' (#3363, #3364) Utils.cs: - REST method error message: Enum.GetNames() -> lowercased names - GraphQL operation error message: enum ToString() -> lowercased strings
4 tasks
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns the DAB CLI’s --help text and certain CLI validation error messages with the JSON schema’s expected lowercase enum values, avoiding confusion when users copy/paste values into config or CLI args.
Changes:
- Lowercase enum values displayed in
dab init --helpfor--host-mode. - Lowercase enum values displayed in
dab add/update --helpfor--rest.methodsand--graphql.operation. - Lowercase enum values shown in CLI error messages for invalid REST method / GraphQL operation inputs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Cli/Utils.cs |
Lowercases supported REST/GraphQL enum values in validation error messages. |
src/Cli/Commands/InitOptions.cs |
Updates --host-mode HelpText to show lowercase schema values. |
src/Cli/Commands/EntityOptions.cs |
Updates --rest.methods and --graphql.operation HelpText to show lowercase schema values. |
Aniruddh25
approved these changes
Apr 16, 2026
| 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]")] |
Contributor
There was a problem hiding this comment.
Even if we change the description to say we use the lowercase version of the values. Both lowercase and uppercase should be supported.
So can you just test it locally to ensure it works for both?
RubenCerna2079
approved these changes
Apr 16, 2026
Contributor
RubenCerna2079
left a comment
There was a problem hiding this comment.
Approving assuming comments will be addressed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 4 issues where CLI
--helptext and error messages showed PascalCase or UPPERCASE enum values instead of the lowercase values required by the JSON schema.The JSON serialization layer already produces lowercase (via
EnumMemberJsonEnumConverterFactory), so these fixes align the CLI display layer to match.Issues Addressed
--host-mode(init)Development or Productiondevelopment or production--rest.methods(add/update)[GET, POST, PUT, PATCH, DELETE][get, post, put, patch, delete]--graphql.operation(add/update)[Query, Mutation][query, mutation]--graphql.operation(add/update)Files Changed
src/Cli/Commands/InitOptions.cshost-modeHelpText: lowercase enum valuessrc/Cli/Commands/EntityOptions.csrest.methodsandgraphql.operationHelpText: lowercase enum valuessrc/Cli/Utils.csTesting