mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Merge pull request #3418 from nikhiljindal/swagger-ui
Fixing broken swagger-ui
This commit is contained in:
commit
82afbab334
@ -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).
|
||||||
|
Loading…
Reference in New Issue
Block a user