diff --git a/expr/http_endpoint.go b/expr/http_endpoint.go index 9f84995116..774a3a9f78 100644 --- a/expr/http_endpoint.go +++ b/expr/http_endpoint.go @@ -131,6 +131,9 @@ func (e *HTTPEndpointExpr) PathParams() *MappedAttributeExpr { for _, r := range e.Routes { for _, p := range r.Params() { att := pat.Find(p) + if att == nil { + continue + } obj.Set(p, att) if e.Params.IsRequired(p) { v.AddRequired(p)