joi-router.js
function makeSpecExposer(spec) {
  const defn = clone(spec);
  return async function specExposer(ctx, next) {
    ctx.state.route = defn;
    await next();
  };
}
function makeSpecExposer(spec) {
  const defn = clone(spec);
  return async function specExposer(ctx, next) {
    ctx.state.route = defn;
    await next();
  };
}
function makeSpecExposer ( spec ) { const defn = clone ( spec ) ; return async function specExposer ( ctx , next ) { ctx . state . route = defn ; await next ( ) ; } ; }
Exposes route spec
@param {Object} spec The route spec
@returns {async Function} Middleware
@api private
Exposes route spec