Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flag names for consistency in Ballerina EDI tool #6045

Closed
RDPerera opened this issue Feb 13, 2024 · 0 comments · Fixed by ballerina-platform/edi-tools#30
Closed

Update flag names for consistency in Ballerina EDI tool #6045

RDPerera opened this issue Feb 13, 2024 · 0 comments · Fixed by ballerina-platform/edi-tools#30
Assignees
Labels
module/edi-tools Issues related to Ballerina EDI CLI tool Type/Task

Comments

@RDPerera
Copy link
Member

Description:

The current usage of flags in the Ballerina EDI Tool (bal edi) deviates from the standard conventions followed by other Ballerina tools. To align the EDI tool with the rest of the Ballerina tool suite and improve consistency for users, I propose updating the following flag names:

  1. Change -s flag to -i for input path:

    • -s, --schema is currently used to specify the input path for various commands. To adhere to the standard convention of using -i --input for input-related flags across Ballerina tools, I suggest updating -s to -i.
  2. Combine -O and -n flags into -p for output path and library name:

    • -O, --organization is used for specifying the output path in some commands, while -n, --name is used for providing the name of generated libraries in the libgen command. To streamline the usage and provide a more intuitive experience, I recommend combining these into a single flag, -p, --package for specifying both the output path and library name.

Describe your task(s)

  1. For -s flag:
    Change:

    -s, --schema
    

    to:

    -i, --input
    
  2. For -o and -n flags:
    Combine:

    -o, --organization
    -n, --name
    

    into:

    -p, --package
    

Examples:

  • Before:

    $ bal edi codegen -s resources/schema.json -o modules/orders/records.bal
    $ bal edi libgen -O myorg -n order -s schemas/ -o lib/
    
  • After:

    $ bal edi codegen -i resources/schema.json -o modules/orders/records.bal
    $ bal edi libgen -p myorg/order -s schemas/ -o lib/
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/edi-tools Issues related to Ballerina EDI CLI tool Type/Task
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant