mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Swagger output for PATCH can be more strongly typed
This commit is contained in:
parent
1ba909098e
commit
93f921b677
@ -64,3 +64,6 @@ func (apiVersions APIVersions) String() string {
|
||||
func (apiVersions APIVersions) GoString() string {
|
||||
return apiVersions.String()
|
||||
}
|
||||
|
||||
// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
|
||||
type Patch struct{}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user