Add TypeMeta to discovery response objects

This commit is contained in:
Jordan Liggitt
2015-10-27 09:29:18 -04:00
parent 465c5b0791
commit 3bc4abb9aa
5 changed files with 54 additions and 5 deletions

View File

@@ -225,5 +225,9 @@ func GetCodecForObject(obj runtime.Object) (runtime.Codec, error) {
return group.Codec(), nil
}
}
// Codec used for unversioned types
if api.Scheme.Recognizes("", kind) {
return api.Codec, nil
}
return nil, fmt.Errorf("unexpected kind: %v", kind)
}