Make OpenAPI GVK and Action extensions all lower-case

Kubernetes-commit: a3cbfde4b18fdbddf9c94be80acd4f0468a492b7
This commit is contained in:
mbohlool 2017-05-26 17:29:22 -07:00 committed by Kubernetes Publisher
parent d84eb10096
commit 749c4d2fef
1 changed files with 6 additions and 2 deletions

View File

@ -808,8 +808,12 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
return nil, fmt.Errorf("unrecognized action verb: %s", action.Verb)
}
for _, route := range routes {
route.Metadata(ROUTE_META_GVK, reqScope.Kind)
route.Metadata(ROUTE_META_ACTION, action.Verb)
route.Metadata(ROUTE_META_GVK, metav1.GroupVersionKind{
Group: reqScope.Kind.Group,
Version: reqScope.Kind.Version,
Kind: reqScope.Kind.Kind,
})
route.Metadata(ROUTE_META_ACTION, strings.ToLower(action.Verb))
ws.Route(route)
}
// Note: update GetAuthorizerAttributes() when adding a custom handler.