diff --git a/kustomize/commands/openapi/fetch/fetch.go b/kustomize/commands/openapi/fetch/fetch.go index bdc52484d4..798559768d 100644 --- a/kustomize/commands/openapi/fetch/fetch.go +++ b/kustomize/commands/openapi/fetch/fetch.go @@ -20,9 +20,7 @@ in the user's kubeconfig`, Run: func(cmd *cobra.Command, args []string) { printSchema(w) }, - Hidden: true, } - return &infoCmd } diff --git a/kustomize/commands/openapi/info/info.go b/kustomize/commands/openapi/info/info.go index a3534d0327..9c682dda92 100644 --- a/kustomize/commands/openapi/info/info.go +++ b/kustomize/commands/openapi/info/info.go @@ -13,7 +13,6 @@ import ( // NewCmdInfo makes a new info command. func NewCmdInfo(w io.Writer) *cobra.Command { - infoCmd := cobra.Command{ Use: "info", Short: "Prints the `info` field from the kubernetes OpenAPI data", @@ -21,8 +20,6 @@ func NewCmdInfo(w io.Writer) *cobra.Command { Run: func(cmd *cobra.Command, args []string) { fmt.Fprintln(w, kubernetesapi.Info) }, - Hidden: true, } - return &infoCmd } diff --git a/kustomize/commands/openapi/openapi.go b/kustomize/commands/openapi/openapi.go index d60442cfeb..84e9b96265 100644 --- a/kustomize/commands/openapi/openapi.go +++ b/kustomize/commands/openapi/openapi.go @@ -7,7 +7,6 @@ import ( "io" "github.com/spf13/cobra" - "sigs.k8s.io/kustomize/cmd/config/configcobra" "sigs.k8s.io/kustomize/kustomize/v4/commands/openapi/fetch" "sigs.k8s.io/kustomize/kustomize/v4/commands/openapi/info" ) @@ -24,7 +23,5 @@ func NewCmdOpenAPI(w io.Writer) *cobra.Command { openApiCmd.AddCommand(info.NewCmdInfo(w)) openApiCmd.AddCommand(fetch.NewCmdFetch(w)) - configcobra.AddCommands(openApiCmd, "openapi") - return openApiCmd }