Check service path wildcards against api base path rather than other service paths
@@ -174,8 +174,8 @@ func Path(val string) {
httpdesign.Root.Path = val
case *httpdesign.ServiceExpr:
if !strings.HasPrefix(val, "//") {
- for _, sp := range def.Paths {
- awcs := httpdesign.ExtractWildcards(sp)
+ rp := httpdesign.Root.Path
+ awcs := httpdesign.ExtractWildcards(rp)
wcs := httpdesign.ExtractWildcards(val)
for _, awc := range awcs {
for _, wc := range wcs {
@@ -185,7 +185,6 @@ func Path(val string) {
}
}
}
- }
def.Paths = append(def.Paths, val)
default:
eval.IncompatibleDSL()
