find partial resource matches

This commit is contained in:
deads2k
2015-12-07 08:12:24 -05:00
parent 3415f1dfc2
commit 41b78ad2b6
21 changed files with 699 additions and 135 deletions

View File

@@ -44,7 +44,7 @@ func GetSwaggerSchema(version unversioned.GroupVersion, kubeClient client.Interf
// SplitAndParseResourceRequest separates the users input into a model and fields
func SplitAndParseResourceRequest(inResource string, mapper meta.RESTMapper) (string, []string, error) {
inResource, fieldsPath := splitDotNotation(inResource)
inResource, _ = mapper.ResourceSingularizer(expandResourceShortcut(inResource))
inResource, _ = mapper.ResourceSingularizer(expandResourceShortcut(unversioned.GroupVersionResource{Resource: inResource}).Resource)
return inResource, fieldsPath, nil
}