let kubectl api-versions use the discovery client

This commit is contained in:
Chao Xu
2015-10-16 14:36:49 -07:00
parent 236193a26d
commit eb3a80156a
8 changed files with 20 additions and 27 deletions

View File

@@ -196,7 +196,7 @@ func (c *Client) SwaggerSchema(groupVersion string) (*swagger.ApiDeclaration, er
if err != nil {
return nil, err
}
groupVersions := extractGroupVersions(groupList)
groupVersions := ExtractGroupVersions(groupList)
// This check also takes care the case that kubectl is newer than the running endpoint
if stringDoesntExistIn(groupVersion, groupVersions) {
return nil, fmt.Errorf("API version: %s is not supported by the server. Use one of: %v", groupVersion, groupVersions)