Merge pull request #9962 from smarterclayton/type_patch

Give PATCH operations a better output in Swagger
This commit is contained in:
Satnam Singh
2015-06-18 14:31:49 -07:00
4 changed files with 69 additions and 58 deletions

View File

@@ -447,8 +447,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
Consumes(string(api.JSONPatchType), string(api.MergePatchType), string(api.StrategicMergePatchType)).
Operation("patch"+kind+strings.Title(subresource)).
Produces(append(storageMeta.ProducesMIMETypes(action.Verb), "application/json")...).
Returns(http.StatusOK, "OK", "string").
Reads("string").
Returns(http.StatusOK, "OK", versionedObject).
Reads(api.Patch{}).
Writes(versionedObject)
addParams(route, action.Params)
ws.Route(route)