restish
restish copied to clipboard
Allow base path elements to be ignored
I use an API that uses a base with a path, e.g example.com/api/rest
.
This results in cli commands in the form of:
get-api-rest-foo
get-api-rest-bar-somearg-someotherarg
post-api-rest-foo
post-api-rest-bar-somearg-someotherarg
The API I use is quite verbose, with many, many arguments. As a result, some commands are ridiculously long, sometimes > 100 characters. I could off course add aliases, but I also have a stupid amount of endpoints. I tend to not need the extremely long endpoints, so I don't really want to touch them in my (auto-generated) OpenAPI spec.
It would be nice to have the option to remove the superfluous base path (api-rest-
) portion from the commands.