databricks-cli/cmd/bundle/schema.go

23 lines
444 B
Go
Raw Normal View History

package bundle
import (
2024-09-06 13:18:31 +00:00
"github.com/databricks/cli/bundle/schema"
"github.com/databricks/cli/cmd/root"
"github.com/spf13/cobra"
)
func newSchemaCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "schema",
Short: "Generate JSON Schema for bundle configuration",
Args: root.NoArgs,
}
cmd.RunE = func(cmd *cobra.Command, args []string) error {
2024-09-06 13:18:31 +00:00
_, err := cmd.OutOrStdout().Write(schema.Bytes)
2024-08-27 11:46:52 +00:00
return err
}
return cmd
}