lib/loopback: fix jsdoc comments
Use @property {Object} [properties] instead of @property {Object=} properties for optional properties. Use `**example**` instead of `@example`, since strong-docs don't support the latter.
This commit is contained in:
parent
5f1c3a86eb
commit
51e977de9b
|
@ -210,7 +210,7 @@ loopback.createModel = function (name, properties, options) {
|
|||
/**
|
||||
* Create a model as described by the configuration object.
|
||||
*
|
||||
* @example
|
||||
* **Example**
|
||||
*
|
||||
* ```js
|
||||
* loopback.createModelFromConfig({
|
||||
|
@ -230,8 +230,8 @@ loopback.createModel = function (name, properties, options) {
|
|||
*
|
||||
* @options {Object} model configuration
|
||||
* @property {String} name Unique name.
|
||||
* @property {Object=} properties Model properties
|
||||
* @property {Object=} options Model options. Options can be specified on the
|
||||
* @property {Object} [properties] Model properties
|
||||
* @property {Object} [options] Model options. Options can be specified on the
|
||||
* top level config object too. E.g. `{ base: 'User' }` is the same as
|
||||
* `{ options: { base: 'User' } }`.
|
||||
*/
|
||||
|
@ -270,7 +270,7 @@ function buildModelOptionsFromConfig(config) {
|
|||
* @param {Model} ModelCtor The model constructor to alter.
|
||||
* @options {Object} Additional configuration to apply
|
||||
* @property {DataSource} dataSource Attach the model to a dataSource.
|
||||
* @property {Object} relations Model relations to add/update.
|
||||
* @property {Object} [relations] Model relations to add/update.
|
||||
*/
|
||||
loopback.configureModel = function(ModelCtor, config) {
|
||||
var settings = ModelCtor.settings;
|
||||
|
|
Loading…
Reference in New Issue