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
The current Waterfall CLI (0.3.2) provides a way for the CommandSpec.data.accepts to define a list of acceptable items the user may specify on the input, but, it limits the user to only selecting a single item.
When the CommandSpec.data omits the accepts property, whatever is supplied is passed through to the CLI verb processing code without doing any validation checks at all. This means the client is required to validate, and is responsible for output having a consistent appearance.
It would be nice to have a way to indicate that multiple of the provided accepts items are allowed, so that the validity checks will be done by Waterfall CLI.
This would have a nice benefit in terms of making the usage of the --help more consistent too. When the accepts property is given, Waterfall CLI generates the output to incorporate that list. Not using the accepts means one has to leverage the description property to describe the list of available options, and the output is not quite the same.
eg:
Output with accepts undefined:
Peters-MBP:main-stack peterbelbin$ spark test --help
Description: Run tests against some aspect of the project
Usage: spark test [flags] [data]
FLAGS:
--version, -v Show version
--help, -h Show help
DATA:
What to test: subset of: api, admin, cst, mt (required)
Peters-MBP:main-stack peterbelbin$
Output with accepts defined:
Peters-MBP:main-stack peterbelbin$ spark test --help
Description: Run tests against some aspect of the project
Usage: spark test [flags] [data]
FLAGS:
--version, -v Show version
--help, -h Show help
DATA:
What to test: list of testables (required) (accepts: api, admin, cst, mt)
The text was updated successfully, but these errors were encountered:
The current Waterfall CLI (0.3.2) provides a way for the
CommandSpec.data.accepts
to define a list of acceptable items the user may specify on the input, but, it limits the user to only selecting a single item.When the
CommandSpec.data
omits theaccepts
property, whatever is supplied is passed through to the CLI verb processing code without doing any validation checks at all. This means the client is required to validate, and is responsible for output having a consistent appearance.It would be nice to have a way to indicate that multiple of the provided
accepts
items are allowed, so that the validity checks will be done by Waterfall CLI.This would have a nice benefit in terms of making the usage of the
--help
more consistent too. When theaccepts
property is given, Waterfall CLI generates the output to incorporate that list. Not using theaccepts
means one has to leverage thedescription
property to describe the list of available options, and the output is not quite the same.eg:
accepts
undefined:accepts
defined:The text was updated successfully, but these errors were encountered: