Add DecodeIntoWithSpecifiedVersionKind() to Decoder interface.
The function validate/default the body with the passed in apiVersion and Kind. It's called in createHandler and UpdateResource
This commit is contained in:
@@ -38,6 +38,7 @@ type ObjectCodec interface {
|
||||
type Decoder interface {
|
||||
Decode(data []byte) (Object, error)
|
||||
DecodeInto(data []byte, obj Object) error
|
||||
DecodeIntoWithSpecifiedVersionKind(data []byte, obj Object, kind, version string) error
|
||||
}
|
||||
|
||||
// Encoder defines methods for serializing API objects into bytes
|
||||
|
Reference in New Issue
Block a user