mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #3822 from nikhiljindal/swaggerbug
Fixing a bug where Reads() was being called twice on POST routes
This commit is contained in:
		@@ -128,8 +128,7 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	createRoute := ws.POST(path).To(h).
 | 
						createRoute := ws.POST(path).To(h).
 | 
				
			||||||
		Doc("create a " + kind).
 | 
							Doc("create a " + kind).
 | 
				
			||||||
		Operation("create" + kind).
 | 
							Operation("create" + kind)
 | 
				
			||||||
		Reads(versionedObject) // from the request
 | 
					 | 
				
			||||||
	addParamIf(createRoute, namespaceParam, namespaceScope)
 | 
						addParamIf(createRoute, namespaceParam, namespaceScope)
 | 
				
			||||||
	if _, ok := storage.(RESTCreater); ok {
 | 
						if _, ok := storage.(RESTCreater); ok {
 | 
				
			||||||
		ws.Route(createRoute.Reads(versionedObject)) // from the request
 | 
							ws.Route(createRoute.Reads(versionedObject)) // from the request
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user