Commit f8db96b6 authored by nikhiljindal's avatar nikhiljindal

Fixing a bug in

https://github.com/GoogleCloudPlatform/kubernetes/pull/3404 which broke swagger-ui. Swagger-ui requires operation to be defined on all Routes.
parent 24e59de0
......@@ -167,8 +167,7 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin
if _, ok := storage.(RESTGetter); ok {
ws.Route(getRoute.Writes(versionedObject)) // on the response
} else {
ws.Route(ws.GET(path+"/{name}").To(h).
Returns(http.StatusMethodNotAllowed, "reading individual objects is not supported", nil))
ws.Route(getRoute.Returns(http.StatusMethodNotAllowed, "reading individual objects is not supported", nil))
}
updateRoute := ws.PUT(path + "/{name}").To(h).
......
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