Merge pull request #9376 from feihujiang/createValidateCrash

kubetcl create --validate crashes when no apiVersion or kind is provided
This commit is contained in:
krousey
2015-06-09 09:59:42 -07:00
3 changed files with 13 additions and 7 deletions

View File

@@ -266,7 +266,7 @@ type clientSwaggerSchema struct {
}
func (c *clientSwaggerSchema) ValidateBytes(data []byte) error {
version, _, err := c.t.DataVersionAndKind(data)
version, _, err := runtime.UnstructuredJSONScheme.DataVersionAndKind(data)
if err != nil {
return err
}