linode-cli
linode-cli copied to clipboard
feat: add examples from OAS to --help prompt
This will output the examples provided in the openapi spec to the --help prompt. For example:
linodecli linodes create --help
linode-cli linodes create
Linode Create
Arguments:
--type: (required) The [Linode Type](/docs/api/linode-types/#types-list) of the Linode you are creating.
...
Example:
linode-cli linodes create --type="g6-standard-2" --region="us-east" --image="linode/debian9" --root_pass="aComplexP@ssword" --authorized_keys="['ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer']" --authorized_users="['myUser', 'secondaryUser']" --stackscript_id="10079" --stackscript_data="{'gh_username': 'linode'}" --booted="" --backup_id="1234" --backups_enabled="" --swap_size="512" --label="linode123" --tags="['example tag', 'another example']" --group="Linode-Group" --private_ip="True" --interfaces.label="example-interface" --interfaces.ipam_address="10.0.0.1/24" --interfaces.purpose="vlan"
How do you feel about the approach in https://github.com/linode/linode-cli/pull/303? That's based off of this branch, but uses the CLI examples in the spec (where they are present).