diff --git a/internal/openapi/server.go b/internal/openapi/server.go index a20b7897..905ed610 100644 --- a/internal/openapi/server.go +++ b/internal/openapi/server.go @@ -52,7 +52,7 @@ func (srv *Server) sanitize() *core.Error { } k := "{" + key + "}" - if strings.Index(srv.URL, k) < 0 { + if !strings.Contains(srv.URL, k) { return core.NewError(locale.ErrInvalidValue).WithField("variables[" + key + "]") } }