docs: function routerStrategy(metadata, dataAdapter, opts) {
      const { router, routePrefix } = opts;
      for (const name in metadata) {
          const obj = metadata[name];
          const { routeSwitch = {} } = obj;
          let originalPath = name.toLowerCase();
          if (routePrefix) {
              routePrefix = routePrefix.startsWith('/') ? routePrefix : `/${routePrefix}`;
              originalPath = `${routePrefix}/${originalPath}`;
          } else {
              originalPath = `/${originalPath}`;
          }
          for (const key in routes) {
              if (routeSwitch[key] !== true) continue;
  
              let path = originalPath;
              const route = routes[key];
              const { pres, posts } = getHooks(obj, key, opts);
              const middleware = route.call(null, name, dataAdapter, opts, pres, posts);
  
              let method = null;
              switch (key) {
                  case 'list':
                      method = 'get';
                      break;
                  case 'id':
                      path = `${path}/id`;
                      method = 'get';
                      break;
                  case 'create':
                      method = 'post';
                      break;
                  case 'update':
                      method = 'put';
                      break;
                  case 'remove':
                      method = 'delete';
                      break;
              }
  
              if (!method) {
                  continue;
              }
  
              router[method](path, middleware);
              if (typeof opts.onRoute === 'function') {
                  opts.onRoute.call(null, { name, path, method, middleware, pres, posts });
              }
          }
      }
      return async function empty(ctx, next) {
          try {
              await next();
          } catch (err) {
              throw err;
          }
      };
  }