See this example of the aws-cli
where you can create a skeleton command for creating an ec2 instance with the elements that the command accepts.
This feature request would be to add the ability to generate a skeleton of a command from the ziti-cli. For instance, the command ziti edge create identity --skeleton
would output the json (or whatever payload or structure) the command will accept.
See the --help
options. All the commands (i think?) support the --output-request-json
flag.
Here's one example:
ziti edge create config --help
creates a config managed by the Ziti Edge Controller
Usage:
ziti edge create config <name> <type> [JSON configuration data] [flags]
Flags:
-i, --cli-identity string Specify the saved identity you want the CLI to use when connect to the controller with
-h, --help help for config
-f, --json-file string Read config JSON from a file instead of the command line
-j, --output-json Output the full JSON response from the Ziti Edge Controller
--output-request-json Output the full JSON request to the Ziti Edge Controller
-t, --tags stringToString Add tags to entity definition (default [])
--tags-json string Add tags defined in JSON to entity definition
--timeout int Timeout for REST operations (specified in seconds) (default 5)
--verbose Enable verbose logging
notice:
-j, --output-json Output the full JSON response from the Ziti Edge Controller
--output-request-json Output the full JSON request to the Ziti Edge Controller
I was looking at that, actually. I was going to try that on my next command.
I think I am more looking for all the elements that the resource will accept. Even if the spec is blank, having a json document with all the possible keys would be helpful.
Digging into the repo I can see that the flags that are accepted start on this line.
It would be really nice if this could be dumped from the command. Or if this list of flags could be documented somewhere. I see that each of the flags does have definition text, but I don't know how to get that flag definition text from the cli.