mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Swagger output for PATCH can be more strongly typed
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user