Closed
Description
Follow up from #21398
Parameter encoding/decoding follows an odd and asymmetric path today:
Encoding:
runtime.NewParameterCodec(...).EncodeParameters(runtime.Object, destination groupversion)
-> queryparams.Convert(runtime.Object)
uses json tag names as parameter names
primitive values are added as query parameter string values
struct values (currently only unversioned.Time) can convert themselves to a query parameter string value
Decoding:
runtime.NewParameterCodec(...).DecodeParameters(url.Values, source groupversion, destination object)
-> conversion.convert(url.Values, versioned destination object)
uses defined conversion functions between `*[]string` and field types to convert url query parameters to options structs
I'm not sure we want lots of arbitrary struct->queryparam serialization, but these paths should be more unified.