Pass only an Api instance to the middleware, not methodPathPattern

relates to #74