lib/types/parameter.js
function Parameter (opOrPathObject, definition, definitionFullyResolved, pathToDefinition) {
  // Assign local properties
  this.definition = definition;
  this.definitionFullyResolved = definitionFullyResolved;
  this.pathToDefinition = pathToDefinition;
  this.ptr = JsonRefs.pathToPtr(pathToDefinition);

  if (_.has(opOrPathObject, 'consumes')) {
    this.operationObject = opOrPathObject;
    this.pathObject = opOrPathObject.pathObject;
  } else {
    this.operationObject = undefined;
    this.pathObject = opOrPathObject;
  }

  // Assign local properties from the OpenAPI Parameter Object definition
  _.assign(this, definitionFullyResolved);

  if (_.isUndefined(this.schema)) {
    this.schema = helpers.computeParameterSchema(definitionFullyResolved);
  }

  this.pathObject.apiDefinition._debug('          %s%s (in: %s) at %s',
                                       _.isUndefined(this.operationObject) ? '' : '  ',
                                       definitionFullyResolved.name,
                                       definitionFullyResolved.in,
                                       this.ptr);
}
function Parameter (opOrPathObject, definition, definitionFullyResolved, pathToDefinition) {
  // Assign local properties
  this.definition = definition;
  this.definitionFullyResolved = definitionFullyResolved;
  this.pathToDefinition = pathToDefinition;
  this.ptr = JsonRefs.pathToPtr(pathToDefinition);

  if (_.has(opOrPathObject, 'consumes')) {
    this.operationObject = opOrPathObject;
    this.pathObject = opOrPathObject.pathObject;
  } else {
    this.operationObject = undefined;
    this.pathObject = opOrPathObject;
  }

  // Assign local properties from the OpenAPI Parameter Object definition
  _.assign(this, definitionFullyResolved);

  if (_.isUndefined(this.schema)) {
    this.schema = helpers.computeParameterSchema(definitionFullyResolved);
  }

  this.pathObject.apiDefinition._debug('          %s%s (in: %s) at %s',
                                       _.isUndefined(this.operationObject) ? '' : '  ',
                                       definitionFullyResolved.name,
                                       definitionFullyResolved.in,
                                       this.ptr);
}
function Parameter ( opOrPathObject , definition , definitionFullyResolved , pathToDefinition ) { // Assign local properties this . definition = definition ; this . definitionFullyResolved = definitionFullyResolved ; this . pathToDefinition = pathToDefinition ; this . ptr = JsonRefs . pathToPtr ( pathToDefinition ) ; if ( _ . has ( opOrPathObject , 'consumes' ) ) { this . operationObject = opOrPathObject ; this . pathObject = opOrPathObject . pathObject ; } else { this . operationObject = undefined ; this . pathObject = opOrPathObject ; } // Assign local properties from the OpenAPI Parameter Object definition _ . assign ( this , definitionFullyResolved ) ; if ( _ . isUndefined ( this . schema ) ) { this . schema = helpers . computeParameterSchema ( definitionFullyResolved ) ; } this . pathObject . apiDefinition . _debug ( '          %s%s (in: %s) at %s' , _ . isUndefined ( this . operationObject ) ? '' : '  ' , definitionFullyResolved . name , definitionFullyResolved . in , this . ptr ) ; }
The OpenAPI Parameter object.

**Note:** Do not use directly.

**Extra Properties:** Other than the documented properties, this object also exposes all properties of the
[OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#parameterObject).

@param {module:sway.Operation|module:sway.Path} opOrPathObject - The `Operation` or `Path` object
@param {object} definition - The parameter definition *(The raw parameter definition __after__ remote references were
resolved)*
@param {object} definitionFullyResolved - The parameter definition with all of its resolvable references resolved
@param {string[]} pathToDefinition - The path segments to the parameter definition

@property {object} definition - The parameter definition *(The raw parameter definition __after__ remote references
were resolved)*
@property {object} definitionFullyResolved - The parameter definition with all of its resolvable references resolved
@property {module:sway.Operation} operationObject - The `Operation` object the parameter belongs to *(Can be
`undefined` for path-level parameters)*
@property {module:sway.Path} pathObject - The `Path` object the parameter belongs to
@property {string[]} pathToDefinition - The path segments to the parameter definition
@property {string} ptr - The JSON Pointer to the parameter definition
@property {object} schema - The JSON Schema for the parameter *(For non-body parameters, this is a computed value)*

@constructor

@memberof module:sway
The OpenAPI Parameter object .