Merge pull request #28587 from wojtek-t/remove_codec_from_content_config
Automatic merge from submit-queue Remove Codec from ContentConfig. This is the remaining cleanup after adding NegotiatedSerializer to ContentConfig.
This commit is contained in:
@@ -222,7 +222,3 @@ func (c *RESTClient) Delete() *Request {
|
||||
func (c *RESTClient) APIVersion() unversioned.GroupVersion {
|
||||
return *c.contentConfig.GroupVersion
|
||||
}
|
||||
|
||||
func (c *RESTClient) Codec() runtime.Codec {
|
||||
return c.contentConfig.Codec
|
||||
}
|
||||
|
@@ -143,15 +143,6 @@ type ContentConfig struct {
|
||||
// NegotiatedSerializer is used for obtaining encoders and decoders for multiple
|
||||
// supported media types.
|
||||
NegotiatedSerializer runtime.NegotiatedSerializer
|
||||
|
||||
// Codec specifies the encoding and decoding behavior for runtime.Objects passed
|
||||
// to a RESTClient or Client. Required when initializing a RESTClient, optional
|
||||
// when initializing a Client.
|
||||
//
|
||||
// DEPRECATED: Please use NegotiatedSerializer instead.
|
||||
// Codec is currently used only in some tests and will be removed soon.
|
||||
// All production setups should use NegotiatedSerializer.
|
||||
Codec runtime.Codec
|
||||
}
|
||||
|
||||
// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config
|
||||
|
@@ -273,7 +273,6 @@ func (obj NotAnAPIObject) SetGroupVersionKind(gvk *unversioned.GroupVersionKind)
|
||||
func defaultContentConfig() ContentConfig {
|
||||
return ContentConfig{
|
||||
GroupVersion: testapi.Default.GroupVersion(),
|
||||
Codec: testapi.Default.Codec(),
|
||||
NegotiatedSerializer: testapi.Default.NegotiatedSerializer(),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user