docs: function getMethodArgs (args, req, spec) {
      // whether or not response will be JSON
      var json = req.query.json === '1' || req.query.json === 'true'
          || (req.xhr && req.query.json !== '0' && req.query.json !== 'false')
          || (req.headers.accept && req.headers.accept.match(jsonRegExp) && req.query.json !== '0' && req.query.json !== 'false')
          ? true : false
      // build args with session from request
      var methodArgs = {
          json: json,
          session: req.session || {},
      }
      // get input based on spec
      _.each(spec.input, (src, dst) => {
          // if source is array then it is list of possible values
          if (Array.isArray(src)) {
              var srcLength = src.length
              // check each source value and take first
              for (var i=0; i < srcLength; i++) {
                  var val = _.get(req, src[i])
                  // if value found then use and break
                  if (defined(val)) {
                      methodArgs[dst] = val
                      break
                  }
              }
          }
          // otherwise source should be string property name
          else {
              methodArgs[dst] = _.get(req, src)
          }
      })
      // get controller
      var controller = args.route.controller
      // get model
      var model = args.route.model
      // if model data is being submitted do some normalization
      if (controller && controller.form && model && methodArgs[model.name]) {
          var data = methodArgs[model.name]
          // iterate over fields
          _.each(controller.form.fields, field => {
              if (Array.isArray(field)) {
                  _.each(field, field => {
                      normalizeInput(data, field)
                  })
              }
              else {
                  normalizeInput(data, field)
              }
          })
      }
      // return args
      return methodArgs
  }