Commit 55cb45af authored by Dan Gillespie's avatar Dan Gillespie

changed NewDefaultRESTMapper to check for a partial package path

parent aa9e1398
...@@ -43,10 +43,10 @@ func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, inter ...@@ -43,10 +43,10 @@ func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, inter
for _, gv := range defaultGroupVersions { for _, gv := range defaultGroupVersions {
for kind, oType := range Scheme.KnownTypes(gv) { for kind, oType := range Scheme.KnownTypes(gv) {
gvk := gv.WithKind(kind) gvk := gv.WithKind(kind)
// TODO: Remove import path prefix check. // TODO: Remove import path check.
// We check the import path prefix because we currently stuff both "api" and "extensions" objects // We check the import path because we currently stuff both "api" and "extensions" objects
// into the same group within Scheme since Scheme has no notion of groups yet. // into the same group within Scheme since Scheme has no notion of groups yet.
if !strings.HasPrefix(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) { if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) {
continue continue
} }
scope := meta.RESTScopeNamespace scope := meta.RESTScopeNamespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment