Merge pull request #115339 from kevindelgado/patch-opton-params

Separate Put and Patch Options
This commit is contained in:
Kubernetes Prow Robot 2023-01-30 13:49:00 -08:00 committed by GitHub
commit 0cb1eabbf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,13 +348,13 @@ func (b *builder) buildRoute(root, path, httpMethod, actionVerb, operationVerb s
// Build option parameters
switch actionVerb {
case "get":
// TODO: CRD support for export is still under consideration
endpoints.AddObjectParams(b.ws, route, &metav1.GetOptions{})
case "list", "deletecollection":
endpoints.AddObjectParams(b.ws, route, &metav1.ListOptions{})
case "put", "patch":
// TODO: PatchOption added in feature branch but not in master yet
case "put":
endpoints.AddObjectParams(b.ws, route, &metav1.UpdateOptions{})
case "patch":
endpoints.AddObjectParams(b.ws, route, &metav1.PatchOptions{})
case "post":
endpoints.AddObjectParams(b.ws, route, &metav1.CreateOptions{})
case "delete":