You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
@thebauda why would this be better? Flags are typically optional while the org-id positional parameter is always required in your example. You can also use the CLI shorthand for the body to save yourself having to type out JSON like this:
@thebauda why would this be better? Flags are typically optional while the org-id positional parameter is always required in your example. You can also use the CLI shorthand for the body to save yourself having to type out JSON like this:
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: