aio-cli-plugin-runtime
aio-cli-plugin-runtime copied to clipboard
`api list` to `api get`
Is your feature request related to a problem? Please describe.
Currently, aio rt api list
requires a base path of the api to return results. The behavior of the list
command is inconsistant with other list
s (like action list
). We think get
may be the better verb here as all other get
s do expect arg to return results.
aio rt api list --help
list route/apis for Adobe I/O Runtime
USAGE
$ aio runtime:route:list [BASEPATH] [RELPATH] [APIVERB]
ARGUMENTS
BASEPATH The base path of the api
RELPATH The path of the api relative to the base path
APIVERB (get|post|put|patch|delete|head|options) The http verb
Describe the solution you'd like
Instead of api list
, change the default to api get
and retain list
as an alias for openwhisk users
Additional context related to https://github.com/adobe/aio-cli-plugin-runtime/issues/184
JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-873
Agreed list
should not take any args but we already have a aio api get
. I see this is coming from wsk cli which behaves the same.
openwhisk api does not have a list
api. So both list and get use the same openwhisk get
api but list
command just shows the list instead of the whole api metadata.
Question in openwhisk slack about this. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1602570856060800
@sarahxxu see @Himavanth 's comment here. Our current behavior has feature parity with wsk
and adapting the commands as suggested would break this feature parity.
How do you feel with that?
I like the idea of using list
to list all APIs - if the feature is possible to implement. My point of view is that it's ok to break with wsk parity where it makes sense to improve the experience for the developer. I will help in looking to see if it's possible to even implement this (and would consider then making it a feature request for the wsk
cli too).
Thanks for the feedback @rabbah ! @Himavanth can you follow-up with Rodric and look whether there would be a way to implement the new approach for list
(and eventually contribute the changes back to wsk
cli)?