UNPKG

@loopback/docs

Version:
2,178 lines (1,610 loc) 85.6 kB
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/code-themes/sl-theme.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <div class="navbar navbar-inverse navbar-static-top" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">docs.strongloop.com</a> </div> <div id="modules"></div> </div> <div class="row"> <div class="col-lg-3 column scroll-spy-target"> <ul class="nav nav-pills nav-stacked"> <div id="versions"></div> <li class="depth-3"> <a href="#ControllerSpec">Interface: ControllerSpec</a> </li> <li class="depth-4"> <a href="#ControllerSpec.prototype.basePath">basePath</a> </li> <li class="depth-4"> <a href="#ControllerSpec.prototype.components">components</a> </li> <li class="depth-4"> <a href="#ControllerSpec.prototype.paths">paths</a> </li> <li class="depth-3"> <a href="#RestEndpoint">Interface: RestEndpoint</a> </li> <li class="depth-4"> <a href="#RestEndpoint.prototype.path">path</a> </li> <li class="depth-4"> <a href="#RestEndpoint.prototype.spec">spec</a> </li> <li class="depth-4"> <a href="#RestEndpoint.prototype.verb">verb</a> </li> <li class="depth-3"> <a href="#getControllerSpec">getControllerSpec()</a> </li> <li class="depth-3"> <a href="#api">api()</a> </li> <li class="depth-3"> <a href="#del">del()</a> </li> <li class="depth-3"> <a href="#get">get()</a> </li> <li class="depth-3"> <a href="#operation">operation()</a> </li> <li class="depth-3"> <a href="#patch">patch()</a> </li> <li class="depth-3"> <a href="#post">post()</a> </li> <li class="depth-3"> <a href="#put">put()</a> </li> <li class="depth-3"> <a href="#param">Namespace: param</a> </li> <li class="depth-4"> <a href="#param.array">array()</a> </li> <li class="depth-4"> <a href="#param.header">Object: header</a> </li> <li class="depth-4"> <a href="#param.path">Object: path</a> </li> <li class="depth-4"> <a href="#param.query">Object: query</a> </li> <li class="depth-3"> <a href="#requestBody">Namespace: requestBody</a> </li> <li class="depth-4"> <a href="#requestBody.array">array()</a> </li> <li class="depth-3"> <a href="#REQUEST_BODY_INDEX">REQUEST_BODY_INDEX</a> </li> <li class="depth-3"> <a href="#resolveSchema">resolveSchema()</a> </li> <li class="depth-3"> <a href="#jsonOrBooleanToJSON">jsonOrBooleanToJSON()</a> </li> <li class="depth-3"> <a href="#jsonToSchemaObject">jsonToSchemaObject()</a> </li> <li class="depth-3"> <a href="#OAI3Keys">Namespace: OAI3Keys</a> </li> <li class="depth-4"> <a href="#OAI3Keys.CLASS_KEY">CLASS_KEY</a> </li> <li class="depth-4"> <a href="#OAI3Keys.CONTROLLER_SPEC_KEY">CONTROLLER_SPEC_KEY</a> </li> <li class="depth-4"> <a href="#OAI3Keys.METHODS_KEY">METHODS_KEY</a> </li> <li class="depth-4"> <a href="#OAI3Keys.PARAMETERS_KEY">PARAMETERS_KEY</a> </li> <li class="depth-4"> <a href="#OAI3Keys.REQUEST_BODY_KEY">REQUEST_BODY_KEY</a> </li> </ul> </div> <div class="col-lg-9 col-lg-offset-3 column" data-spy="scroll" data-target=".scroll-spy-target" data-offset="0"> <div class="readability"> <section class="code-doc "> <a name="ControllerSpec"></a> <h3 class="code-ref">Interface: ControllerSpec</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="ControllerSpec.prototype.basePath"></a> <strong class="code-arg-name"> basePath </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>The base path on which the Controller API is served. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/).</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="ControllerSpec.prototype.components"></a> <strong class="code-arg-name"> components </strong> </td> <td class="code-arg-types"> <code><a href="#ComponentsObject">ComponentsObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>OpenAPI components.schemas generated from model metadata</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="ControllerSpec.prototype.paths"></a> <strong class="code-arg-name"> paths </strong> </td> <td class="code-arg-types"> <code><a href="#PathObject">PathObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>The available paths and operations for the API.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="RestEndpoint"></a> <h3 class="code-ref">Interface: RestEndpoint</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Data structure for REST related metadata</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="RestEndpoint.prototype.path"></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Data structure for REST related metadata</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="RestEndpoint.prototype.spec"></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Data structure for REST related metadata</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="RestEndpoint.prototype.verb"></a> <strong class="code-arg-name"> verb </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Data structure for REST related metadata</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="getControllerSpec"></a> <h3 class="code-ref">Function: getControllerSpec</h3> <section class="code-doc "> <a name="getControllerSpec"></a> <h4 class="code-ref">getControllerSpec(constructor: <a href="#Function">Function</a>) : <a href="#ControllerSpec">ControllerSpec</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Get the controller spec for the given class</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> constructor </strong> </td> <td class="code-arg-types"> <code><a href="#Function">Function</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Controller class</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="api"></a> <h3 class="code-ref">Function: api</h3> <section class="code-doc "> <a name="api"></a> <h4 class="code-ref">api(spec: <a href="#ControllerSpec">ControllerSpec</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Decorate the given Controller constructor with metadata describing the HTTP/REST API the Controller implements/provides.</p> </p> <p><p><code>@api</code> can be applied to controller classes. For example,</p> <pre><code><span class="hljs-meta">@api</span>({<span class="hljs-string">basePath:</span> <span class="hljs-string">'/my'</span>}) <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyController</span> {</span> <span class="hljs-comment">// ...</span> }</code></pre></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#ControllerSpec">ControllerSpec</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>OpenAPI specification describing the endpoints handled by this controller</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="del"></a> <h3 class="code-ref">Function: del</h3> <section class="code-doc "> <a name="del"></a> <h4 class="code-ref">del(path: string, spec: <a href="#OperationObject">OperationObject</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Expose a Controller method as a REST API operation mapped to <code>DELETE</code> request method.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The URL path of this operation, e.g. <code>/product/{id}</code></p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The OpenAPI specification describing parameters and responses of this operation.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="get"></a> <h3 class="code-ref">Function: get</h3> <section class="code-doc "> <a name="get"></a> <h4 class="code-ref">get(path: string, spec: <a href="#OperationObject">OperationObject</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Expose a Controller method as a REST API operation mapped to <code>GET</code> request method.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The URL path of this operation, e.g. <code>/product/{id}</code></p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The OpenAPI specification describing parameters and responses of this operation.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="operation"></a> <h3 class="code-ref">Function: operation</h3> <section class="code-doc "> <a name="operation"></a> <h4 class="code-ref">operation(verb: string, path: string, spec: <a href="#OperationObject">OperationObject</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Expose a Controller method as a REST API operation.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> verb </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>HTTP verb, e.g. <code>GET</code> or <code>POST</code>.</p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The URL path of this operation, e.g. <code>/product/{id}</code></p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The OpenAPI specification describing parameters and responses of this operation.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="patch"></a> <h3 class="code-ref">Function: patch</h3> <section class="code-doc "> <a name="patch"></a> <h4 class="code-ref">patch(path: string, spec: <a href="#OperationObject">OperationObject</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Expose a Controller method as a REST API operation mapped to <code>PATCH</code> request method.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The URL path of this operation, e.g. <code>/product/{id}</code></p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The OpenAPI specification describing parameters and responses of this operation.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="post"></a> <h3 class="code-ref">Function: post</h3> <section class="code-doc "> <a name="post"></a> <h4 class="code-ref">post(path: string, spec: <a href="#OperationObject">OperationObject</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Expose a Controller method as a REST API operation mapped to <code>POST</code> request method.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The URL path of this operation, e.g. <code>/product/{id}</code></p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The OpenAPI specification describing parameters and responses of this operation.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="put"></a> <h3 class="code-ref">Function: put</h3> <section class="code-doc "> <a name="put"></a> <h4 class="code-ref">put(path: string, spec: <a href="#OperationObject">OperationObject</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Expose a Controller method as a REST API operation mapped to <code>PUT</code> request method.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The URL path of this operation, e.g. <code>/product/{id}</code></p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> spec </strong> </td> <td class="code-arg-types"> <code><a href="#OperationObject">OperationObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The OpenAPI specification describing parameters and responses of this operation.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="param"></a> <h3 class="code-ref">Namespace: param</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Describe an input parameter of a Controller method. The <code>@param</code> decorator takes an argument of <code>ParameterObject</code> to define how to map the parameter to OpenAPI specification.</p> </p> <p><p><code>@param(paramSpec)</code> must be applied to parameters. For example,</p> <pre><code class="language-ts"><span class="hljs-selector-tag">class</span> <span class="hljs-selector-tag">MyController</span> { <span class="hljs-variable">@get</span>(<span class="hljs-string">'/'</span>) list( <span class="hljs-variable">@param</span>(offsetSpec) offset?: number, <span class="hljs-variable">@param</span>(pageSizeSpec) pageSize?: number, ) {} }</code></pre> </p> </div> </section> <section class="code-doc "> <a name="param.array"></a> <h3 class="code-ref">Function: param.array</h3> <section class="code-doc "> <a name="param.array"></a> <h4 class="code-ref">param.array(name: string, source: <a href="#ParameterLocation">ParameterLocation</a>, itemSpec: <a href="#SchemaObject">SchemaObject</a> | <a href="#ReferenceObject">ReferenceObject</a>) : <a href="#(Anonymous function)">(Anonymous function)</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of <code>array</code> type.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> name </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Parameter name</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> source </strong> </td> <td class="code-arg-types"> <code><a href="#ParameterLocation">ParameterLocation</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Source of the parameter value</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> itemSpec </strong> </td> <td class="code-arg-types"> <code><a href="#SchemaObject">SchemaObject</a> | <a href="#ReferenceObject">ReferenceObject</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Item type for the array or the full item object</p> </p> <p></p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="param.header"></a> <h3 class="code-ref">Object literal: param.header</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Describe an input parameter of a Controller method. The <code>@param</code> decorator takes an argument of <code>ParameterObject</code> to define how to map the parameter to OpenAPI specification.</p> </p> <p><p><code>@param(paramSpec)</code> must be applied to parameters. For example,</p> <pre><code class="language-ts"><span class="hljs-selector-tag">class</span> <span class="hljs-selector-tag">MyController</span> { <span class="hljs-variable">@get</span>(<span class="hljs-string">'/'</span>) list( <span class="hljs-variable">@param</span>(offsetSpec) offset?: number, <span class="hljs-variable">@param</span>(pageSizeSpec) pageSize?: number, ) {} }</code></pre> </p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Variables</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> binary </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.binary) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;binary&quot; type that&#39;s read from a request header. Usage: <code>@param.header.binary(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> boolean </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.boolean) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;boolean&quot; type that&#39;s read from a request header. Usage: <code>@param.header.boolean(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> byte </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.byte) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;byte&quot; type that&#39;s read from a request header. Usage: <code>@param.header.byte(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> date </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.date) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;date&quot; type that&#39;s read from a request header. Usage: <code>@param.header.date(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> dateTime </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.dateTime) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;dateTime&quot; type that&#39;s read from a request header. Usage: <code>@param.header.dateTime(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> double </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.double) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;double&quot; type that&#39;s read from a request header. Usage: <code>@param.header.double(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> float </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.float) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;float&quot; type that&#39;s read from a request header. Usage: <code>@param.header.float(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> integer </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.integer) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;integer&quot; type that&#39;s read from a request header. Usage: <code>@param.header.integer(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> long </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.long) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;long&quot; type that&#39;s read from a request header. Usage: <code>@param.header.long(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> number </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.number) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;number&quot; type that&#39;s read from a request header. Usage: <code>@param.header.number(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> password </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.password) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;password&quot; type that&#39;s read from a request header. Usage: <code>@param.header.password(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> string </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('header', builtinTypes.string) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;string&quot; type that&#39;s read from a request header. Usage: <code>@param.header.string(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="param.path"></a> <h3 class="code-ref">Object literal: param.path</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Describe an input parameter of a Controller method. The <code>@param</code> decorator takes an argument of <code>ParameterObject</code> to define how to map the parameter to OpenAPI specification.</p> </p> <p><p><code>@param(paramSpec)</code> must be applied to parameters. For example,</p> <pre><code class="language-ts"><span class="hljs-selector-tag">class</span> <span class="hljs-selector-tag">MyController</span> { <span class="hljs-variable">@get</span>(<span class="hljs-string">'/'</span>) list( <span class="hljs-variable">@param</span>(offsetSpec) offset?: number, <span class="hljs-variable">@param</span>(pageSizeSpec) pageSize?: number, ) {} }</code></pre> </p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Variables</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> binary </strong> </td> <td class="code-arg-types"> <code><a href="#(Anonymous function)">(Anonymous function)</a></code> </td> <td class="code-arg-default-value"> createParamShortcut('path', builtinTypes.binary) </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Define a parameter of &quot;binary&quot; type that&#39;s read from request path. Usage: <code>@param.path.binary(&#39;paramName&#39;)</code></p> </p> <p></p> </div> </td> </tr> <tr class="code-ar