Commit b0788893 authored by Brendan Burns's avatar Brendan Burns

Merge pull request #3822 from nikhiljindal/swaggerbug

Fixing a bug where Reads() was being called twice on POST routes
parents 99b97858 54e5d1f1
......@@ -128,8 +128,7 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin
createRoute := ws.POST(path).To(h).
Doc("create a " + kind).
Operation("create" + kind).
Reads(versionedObject) // from the request
Operation("create" + kind)
addParamIf(createRoute, namespaceParam, namespaceScope)
if _, ok := storage.(RESTCreater); ok {
ws.Route(createRoute.Reads(versionedObject)) // from the request
......
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