mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-17 01:39:06 +00:00
Merge pull request #4010 from natasha41575/openapicommanddocs
fix openapi command help page
This commit is contained in:
@@ -20,9 +20,7 @@ in the user's kubeconfig`,
|
|||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
printSchema(w)
|
printSchema(w)
|
||||||
},
|
},
|
||||||
Hidden: true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &infoCmd
|
return &infoCmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import (
|
|||||||
|
|
||||||
// NewCmdInfo makes a new info command.
|
// NewCmdInfo makes a new info command.
|
||||||
func NewCmdInfo(w io.Writer) *cobra.Command {
|
func NewCmdInfo(w io.Writer) *cobra.Command {
|
||||||
|
|
||||||
infoCmd := cobra.Command{
|
infoCmd := cobra.Command{
|
||||||
Use: "info",
|
Use: "info",
|
||||||
Short: "Prints the `info` field from the kubernetes OpenAPI data",
|
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) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Fprintln(w, kubernetesapi.Info)
|
fmt.Fprintln(w, kubernetesapi.Info)
|
||||||
},
|
},
|
||||||
Hidden: true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &infoCmd
|
return &infoCmd
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"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/fetch"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v4/commands/openapi/info"
|
"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(info.NewCmdInfo(w))
|
||||||
openApiCmd.AddCommand(fetch.NewCmdFetch(w))
|
openApiCmd.AddCommand(fetch.NewCmdFetch(w))
|
||||||
configcobra.AddCommands(openApiCmd, "openapi")
|
|
||||||
|
|
||||||
return openApiCmd
|
return openApiCmd
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user