optimize code
This commit is contained in:
parent
0e70444ab8
commit
05cdea3e7c
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user