in proxy/protocol/dubbo/schema/schema.go [252:277]
func GetMethodInfoSchemaByURL(schema *registry.SchemaContent, verb string, url string) *DefMethod {
var curMax = 0
basePath := schema.BasePath
var method *registry.MethodInfo
var path string
for key, v := range schema.Paths {
if strings.HasPrefix(url, basePath+key) {
if tmp, ok := v[verb]; ok {
if len(key) > curMax {
curMax = len(key)
method = &tmp
path = key
}
}
}
}
if method != nil {
tmpMeth := &DefMethod{}
tmpMeth.Path = basePath + path
tmpMeth.Verb = verb
CovertSwaggerMethordToLocalMethord(schema, method, tmpMeth)
return tmpMeth
} else {
return nil
}
}