kubetcl create --validate crashes when no apiVersion or kind is provided

This commit is contained in:
feihujiang
2015-06-07 21:02:27 +08:00
parent 0f1c4c25c3
commit 37abe11f8a
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
}