carbond.OperationParameter

Describes an HTTP parameter. Parameter types include: path parameters (e.g., “_id” in “/foo/bar/:_id”), query parameters (e.g., “baz” in “/foo/bar?baz=true”), HTTP header parameters, and HTTP body parameters.

Instance Properties

default
*
Default undefined
Description A default value for the parameter if it is not present in the incoming request
description
string
Default undefined
Description A brief description of this parameter This will be displayed in any generated documentation.
location
string
Required
Description The location of the parameter in an incoming request [choices: “query”, “header”, “path”, “body]
name
string
(read-only)
Description The operation parameter name
required
boolean
Default false
Description Flag determining whether the parameter is required
schema
Object
Default undefined
Description A JSON schema used to validate the incoming parameter

Methods

extractParameterValueFromRequest  
Arguments
  • req (Request) – The incoming request object
Return type *
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.