From 217e5c7268f44139c27d1bb6cb5fa7c342063001 Mon Sep 17 00:00:00 2001 From: Natasha Sarkar Date: Tue, 22 Jun 2021 18:46:34 -0700 Subject: [PATCH] fix openapi command help page --- kustomize/commands/openapi/fetch/fetch.go | 2 -- kustomize/commands/openapi/info/info.go | 3 --- kustomize/commands/openapi/openapi.go | 3 --- 3 files changed, 8 deletions(-) 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 }