This code piggy backs on the existing strategy for parsing new options.
Only difference here is adding the "arity" parameter, to force users to enter exactly 1 value.
Here's how the help text now looks:
Usage: ./kite-dataset [general options] json-schema <sample json path> [command options]
Description:
Build a schema from a JSON data sample
Command options:
-n, --num-records
Number of records to derive schema from (default: 10)
-o, --output
Save schema avsc to path
* --class, --record-name
A name or class for the result schema
--minimize
Minimize schema file size by eliminating white space
* = required
If you don't enter a value in, you'll see this:
Expected a value after parameter --num-records
And if you specify something other than a valid integer is gives you this:
This code piggy backs on the existing strategy for parsing new options.
Only difference here is adding the "arity" parameter, to force users to enter exactly 1 value.
Here's how the help text now looks:
If you don't enter a value in, you'll see this:
And if you specify something other than a valid integer is gives you this: