Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cli): Add a long description for file render #1007

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions cmd/file_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,25 @@ func executeFileRenderCmd(_ *cobra.Command, _ []string) error {
func newFileRenderCmd() *cobra.Command {
renderCmd := &cobra.Command{
Use: "render",
Short: "Render the configuration as Kong declarative config",
Long: ``,
Args: cobra.ArbitraryArgs,
RunE: executeFileRenderCmd,
Short: "Combines multiple complete configuration files and renders them as one Kong declarative config file.",
Long: `Combines multiple complete configuration files and renders them as one Kong
declarative config file.

This command renders a full declarative configuration in JSON or YAML format by assembling
multiple files and populating defaults and environment substitutions.
This command is useful to observe what configuration would be sent prior to synchronizing to
the gateway.

In comparison to the "deck file merge" command, the render command accepts
complete configuration files, while "deck file merge" can operate on partial files.

For example, the following command takes two input files and renders them as one
combined JSON file:

deck file render kong1.yml kong2.yml -o kong3 --format json
`,
Args: cobra.ArbitraryArgs,
RunE: executeFileRenderCmd,
PreRunE: func(cmd *cobra.Command, args []string) error {
fileRenderCmdKongStateFile = args
if len(fileRenderCmdKongStateFile) == 0 {
Expand Down
Loading