lib/OperationParameter.js
function(req) {
    if (!this.name) {
      throw new Error("Incomplete parameter definition. No name specified for parameter definition " + this)
    }

    var result = undefined
    if (this.location === "query") {
      result = req.query[this.name]
    } else if (this.location === "path") {
      result = req.params[this.name]
    } else if (this.location === "header") {
      result = req.header[this.name]
    } else if (this.location === "body") {
      result = req.body
    } else if (this.location === "formData") {
      result = req.body && req.body[this.name]
    } else {
      throw new Error("Unrecognized location value specified for parameter '" + this.name + "': " + this.location)
    }

    // Parameters that come in as an empty string should look like undefined
    if (result === '') {
      result = undefined
    }

    if (!result && this.default) {
      result = this.default
    }

    return result
  }
function(req) {
    if (!this.name) {
      throw new Error("Incomplete parameter definition. No name specified for parameter definition " + this)
    }

    var result = undefined
    if (this.location === "query") {
      result = req.query[this.name]
    } else if (this.location === "path") {
      result = req.params[this.name]
    } else if (this.location === "header") {
      result = req.header[this.name]
    } else if (this.location === "body") {
      result = req.body
    } else if (this.location === "formData") {
      result = req.body && req.body[this.name]
    } else {
      throw new Error("Unrecognized location value specified for parameter '" + this.name + "': " + this.location)
    }

    // Parameters that come in as an empty string should look like undefined
    if (result === '') {
      result = undefined
    }

    if (!result && this.default) {
      result = this.default
    }

    return result
  }
XXX: dead code? ***************************************************************************
@method extractParameterValueFromRequest
@description Retrieves the parameter value from a request, returning the
default value if it does not exist and a default value is
defined. Note, values returned from this method are not
parsed.
@param {carbond.Request} req -- The incoming request object
@returns {*}