From 55cb45afd274e53d931f43b3129698f3bd155910 Mon Sep 17 00:00:00 2001 From: Dan Gillespie Date: Tue, 23 Feb 2016 04:03:34 -0800 Subject: [PATCH] changed NewDefaultRESTMapper to check for a partial package path --- pkg/api/mapper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/api/mapper.go b/pkg/api/mapper.go index 054f74d5e99..0216771eec8 100644 --- a/pkg/api/mapper.go +++ b/pkg/api/mapper.go @@ -43,10 +43,10 @@ func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, inter for _, gv := range defaultGroupVersions { for kind, oType := range Scheme.KnownTypes(gv) { gvk := gv.WithKind(kind) - // TODO: Remove import path prefix check. - // We check the import path prefix because we currently stuff both "api" and "extensions" objects + // TODO: Remove import path check. + // 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. - if !strings.HasPrefix(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) { + if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) { continue } scope := meta.RESTScopeNamespace