Fork API types.
This commit is contained in:
@@ -28,8 +28,11 @@ func TestAPIObject(t *testing.T) {
|
||||
Object APIObject `yaml:"object,omitempty" json:"object,omitempty"`
|
||||
EmptyObject APIObject `yaml:"emptyObject,omitempty" json:"emptyObject,omitempty"`
|
||||
}
|
||||
|
||||
AddKnownTypes(EmbeddedTest{})
|
||||
convert := func(obj interface{}) (interface{}, error) { return obj, nil }
|
||||
AddKnownTypes("", EmbeddedTest{})
|
||||
AddKnownTypes("v1beta1", EmbeddedTest{})
|
||||
AddExternalConversion("EmbeddedTest", convert)
|
||||
AddInternalConversion("EmbeddedTest", convert)
|
||||
|
||||
outer := &EmbeddedTest{
|
||||
JSONBase: JSONBase{ID: "outer"},
|
||||
|
Reference in New Issue
Block a user