-
Notifications
You must be signed in to change notification settings - Fork 70
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
Support Flags for positional arguments and request bodies #236
Comments
@thebauda why would this be better? Flags are typically optional while the restish my-api create-user-in-organization MyOrg first_name: foo, last_name: bah |
I'd like it where required and non-required items can be passed as flags. Not all of my users are familiar with CLI shorthand, and as you stated, writing JSON can be cumbersome and error-prone. |
Would you ever be willing to give my team and I a walkthrough on the Restish project architecture? I'd like to contribute PRs that introduce new features and have you review them. |
TLDR; Support accessing positional arguments and request bodies as flags
When a restish command is available that was generated from an endpoint that path parameters and/or takes a request body, the command is structured as so:
restish <api> <command> <positional-argument-1> '{input.json}'
For example, the following endpoint with the following request body
POST my-api/v2/orgs/{org_id}/create_user_in_organization
would be called by restish as so
It would be better if restish could support using flags to pass values to positional arguments and request bodies. The above example could then be called as so:
The text was updated successfully, but these errors were encountered: