docs: function before (...rest) {
    for (const r of rest) {
      if (typeof r !== 'string') {
        throw new $err.IllegalValue('Values supplied to @before decorator must be strings.');
      }
    }
  
    return function (target, key) {
      // TODO ensure that this is only used on Resources and Routes
      if (rest.length === 0) {
        throw new $err.NotFound(`Empty @before supplied on method ${key} of Resource ${typeof target}`);
      } else if (key === undefined) {
        Metadata.putClassMeta(target.prototype, '@before', 'middleware', rest);
      } else {
        Metadata.putMethodMeta(target, key, '@before', 'middleware', rest);
      }
    };
  }