@loopback/docs
Version:
Documentation for LoopBack 4
571 lines (400 loc) • 13.1 kB
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="#getJsonSchema">getJsonSchema()</a>
</li>
<li class="depth-3">
<a href="#isArrayType">isArrayType()</a>
</li>
<li class="depth-3">
<a href="#isComplexType">isComplexType()</a>
</li>
<li class="depth-3">
<a href="#metaToJsonProperty">metaToJsonProperty()</a>
</li>
<li class="depth-3">
<a href="#modelToJsonSchema">modelToJsonSchema()</a>
</li>
<li class="depth-3">
<a href="#stringTypeToWrapper">stringTypeToWrapper()</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="getJsonSchema"></a>
<h3 class="code-ref">Function: getJsonSchema</h3>
<section class="code-doc ">
<a name="getJsonSchema"></a>
<h4 class="code-ref">getJsonSchema(ctor: <a href="#Function">Function</a>) : <a href="#JSONSchema">JSONSchema</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>Gets the JSON Schema of a TypeScript model/class by seeing if one exists
in a cache. If not, one is generated and then cached.</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">
ctor
</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>Contructor of class to get JSON Schema from</p>
</p>
</div>
</td>
</tr>
</table>
</section>
</section>
<section class="code-doc ">
<a name="isArrayType"></a>
<h3 class="code-ref">Function: isArrayType</h3>
<section class="code-doc ">
<a name="isArrayType"></a>
<h4 class="code-ref">isArrayType(type: string | <a href="#Function">Function</a>) : boolean</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>Determines whether a given string or constructor is array type or not</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">
type
</strong>
</td>
<td class="code-arg-types">
<code>string | <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>Type as string or wrapper</p>
</p>
</div>
</td>
</tr>
</table>
</section>
</section>
<section class="code-doc ">
<a name="isComplexType"></a>
<h3 class="code-ref">Function: isComplexType</h3>
<section class="code-doc ">
<a name="isComplexType"></a>
<h4 class="code-ref">isComplexType(ctor: <a href="#Function">Function</a>) : boolean</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>Determines whether the given constructor is a custom type or not</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">
ctor
</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>Constructor</p>
</p>
</div>
</td>
</tr>
</table>
</section>
</section>
<section class="code-doc ">
<a name="metaToJsonProperty"></a>
<h3 class="code-ref">Function: metaToJsonProperty</h3>
<section class="code-doc ">
<a name="metaToJsonProperty"></a>
<h4 class="code-ref">metaToJsonProperty(meta: <a href="#PropertyDefinition">PropertyDefinition</a>) : <a href="#JSONSchema">JSONSchema</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>Converts property metadata into a JSON property definition</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">
meta
</strong>
</td>
<td class="code-arg-types">
<code><a href="#PropertyDefinition">PropertyDefinition</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>
</div>
</td>
</tr>
</table>
</section>
</section>
<section class="code-doc ">
<a name="modelToJsonSchema"></a>
<h3 class="code-ref">Function: modelToJsonSchema</h3>
<section class="code-doc ">
<a name="modelToJsonSchema"></a>
<h4 class="code-ref">modelToJsonSchema(ctor: <a href="#Function">Function</a>) : <a href="#JSONSchema">JSONSchema</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>Converts a TypeScript class into a JSON Schema using TypeScript's
reflection API</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">
ctor
</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>Constructor of class to convert from</p>
</p>
</div>
</td>
</tr>
</table>
</section>
</section>
<section class="code-doc ">
<a name="stringTypeToWrapper"></a>
<h3 class="code-ref">Function: stringTypeToWrapper</h3>
<section class="code-doc ">
<a name="stringTypeToWrapper"></a>
<h4 class="code-ref">stringTypeToWrapper(type: string | <a href="#Function">Function</a>) : <a href="#Function">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>Gets the wrapper function of primitives string, number, and boolean</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">
type
</strong>
</td>
<td class="code-arg-types">
<code>string | <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>Name of type</p>
</p>
</div>
</td>
</tr>
</table>
</section>
</section>
</div>
<div class="intentionally-left-blank"></div>
</div>
</div>
<script src="js/vendor/jquery-1.10.1.min.js"></script>
<script src="js/vendor/jquery.scrollTo-1.4.3.1.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>