Commit 82afbab3 authored by Brendan Burns's avatar Brendan Burns

Merge pull request #3418 from nikhiljindal/swagger-ui

Fixing broken swagger-ui
parents 55653568 f8db96b6
...@@ -167,8 +167,7 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin ...@@ -167,8 +167,7 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin
if _, ok := storage.(RESTGetter); ok { if _, ok := storage.(RESTGetter); ok {
ws.Route(getRoute.Writes(versionedObject)) // on the response ws.Route(getRoute.Writes(versionedObject)) // on the response
} else { } else {
ws.Route(ws.GET(path+"/{name}").To(h). ws.Route(getRoute.Returns(http.StatusMethodNotAllowed, "reading individual objects is not supported", nil))
Returns(http.StatusMethodNotAllowed, "reading individual objects is not supported", nil))
} }
updateRoute := ws.PUT(path + "/{name}").To(h). 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