mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #100141 from brendandburns/master
Fix api installer to indicate PATCH may return a 201 for server side apply
This commit is contained in:
commit
e5e18d5266
738
api/openapi-spec/swagger.json
generated
738
api/openapi-spec/swagger.json
generated
File diff suppressed because it is too large
Load Diff
@ -805,6 +805,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
|
|||||||
Operation("patch"+namespaced+kind+strings.Title(subresource)+operationSuffix).
|
Operation("patch"+namespaced+kind+strings.Title(subresource)+operationSuffix).
|
||||||
Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...).
|
Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...).
|
||||||
Returns(http.StatusOK, "OK", producedObject).
|
Returns(http.StatusOK, "OK", producedObject).
|
||||||
|
// Patch can return 201 when a server side apply is requested
|
||||||
|
Returns(http.StatusCreated, "Created", producedObject).
|
||||||
Reads(metav1.Patch{}).
|
Reads(metav1.Patch{}).
|
||||||
Writes(producedObject)
|
Writes(producedObject)
|
||||||
if err := AddObjectParams(ws, route, versionedPatchOptions); err != nil {
|
if err := AddObjectParams(ws, route, versionedPatchOptions); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user