Merge pull request #20779 from smarterclayton/origin_explain
Auto commit by PR queue bot
This commit is contained in:
@@ -98,7 +98,7 @@ func RunExplain(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
schema, err := f.SwaggerSchema(apiVersion)
|
schema, err := f.SwaggerSchema(apiVersion.WithKind(gvk.Kind))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@@ -106,8 +106,8 @@ type Factory struct {
|
|||||||
ResumeObject func(object runtime.Object) (bool, error)
|
ResumeObject func(object runtime.Object) (bool, error)
|
||||||
// Returns a schema that can validate objects stored on disk.
|
// Returns a schema that can validate objects stored on disk.
|
||||||
Validator func(validate bool, cacheDir string) (validation.Schema, error)
|
Validator func(validate bool, cacheDir string) (validation.Schema, error)
|
||||||
// SwaggerSchema returns the schema declaration for the provided group version.
|
// SwaggerSchema returns the schema declaration for the provided group version kind.
|
||||||
SwaggerSchema func(unversioned.GroupVersion) (*swagger.ApiDeclaration, error)
|
SwaggerSchema func(unversioned.GroupVersionKind) (*swagger.ApiDeclaration, error)
|
||||||
// Returns the default namespace to use in cases where no
|
// Returns the default namespace to use in cases where no
|
||||||
// other namespace is specified and whether the namespace was
|
// other namespace is specified and whether the namespace was
|
||||||
// overriden.
|
// overriden.
|
||||||
@@ -408,7 +408,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
|
|||||||
}
|
}
|
||||||
return validation.NullSchema{}, nil
|
return validation.NullSchema{}, nil
|
||||||
},
|
},
|
||||||
SwaggerSchema: func(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
|
SwaggerSchema: func(gvk unversioned.GroupVersionKind) (*swagger.ApiDeclaration, error) {
|
||||||
|
version := gvk.GroupVersion()
|
||||||
client, err := clients.ClientForVersion(&version)
|
client, err := clients.ClientForVersion(&version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Reference in New Issue
Block a user