optimize code
This commit is contained in:
		@@ -184,12 +184,14 @@ func renderServiceRoutes(service spec.Service, groups []spec.Group, paths swagge
 | 
				
			|||||||
					requestResponseRefs[param.Schema.Ref] = struct{}{}
 | 
										requestResponseRefs[param.Schema.Ref] = struct{}{}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			operationObject.Summary = route.JoinedDoc()
 | 
								operationObject.Summary = strings.ReplaceAll(route.JoinedDoc(), "\"", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if len(route.AtDoc.Properties) > 0 {
 | 
								if len(route.AtDoc.Properties) > 0 {
 | 
				
			||||||
				operationObject.Description, _ = strconv.Unquote(route.AtDoc.Properties["description"])
 | 
									operationObject.Description, _ = strconv.Unquote(route.AtDoc.Properties["description"])
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								operationObject.Description = strings.ReplaceAll(operationObject.Description, "\"", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			switch strings.ToUpper(route.Method) {
 | 
								switch strings.ToUpper(route.Method) {
 | 
				
			||||||
			case http.MethodGet:
 | 
								case http.MethodGet:
 | 
				
			||||||
				pathItemObject.Get = operationObject
 | 
									pathItemObject.Get = operationObject
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user