Skip to content

Commit

Permalink
WIP partial object metadata kind not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Apr 17, 2017
1 parent f9a8430 commit 6e4960a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ func addToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion)
)
scheme.AddKnownTypes(SchemeGroupVersion,
&metav1alpha1.TableList{},
&metav1alpha1.PartialObjectMetadata{},
)
scheme.AddKnownTypes(metav1alpha1.SchemeGroupVersion,
&metav1alpha1.TableList{},
&metav1alpha1.TableListOptions{},
&metav1alpha1.PartialObjectMetadata{},
)
// Allow delete options to be decoded across all version in this scheme (we may want to be more clever than this)
scheme.AddUnversionedTypes(SchemeGroupVersion, &metav1.DeleteOptions{})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ func transformResponseObject(ctx request.Context, scope RequestScope, req *http.
scope.err(err, w, req)
return
}
item.Object.Object = meta.AsPartialObjectMetadata(m)
// TODO: turn this into an internal type and do conversion in order to get object kind automatically set?
partial := meta.AsPartialObjectMetadata(m)
partial.GetObjectKind().SetGroupVersionKind(metav1alpha1.SchemeGroupVersion.WithKind("PartialObjectMetadata"))
item.Object.Object = partial
}
}

Expand Down

0 comments on commit 6e4960a

Please sign in to comment.