Merge pull request #1304 from edlau/master
fixed the missing '.' in various description fields.
This commit is contained in:
commit
b6a278861f
|
@ -564,7 +564,7 @@ module.exports = function(User) {
|
|||
UserModel.remoteMethod(
|
||||
'login',
|
||||
{
|
||||
description: 'Login a user with username/email and password',
|
||||
description: 'Login a user with username/email and password.',
|
||||
accepts: [
|
||||
{arg: 'credentials', type: 'object', required: true, http: {source: 'body'}},
|
||||
{arg: 'include', type: 'string', http: {source: 'query' },
|
||||
|
|
18
lib/model.js
18
lib/model.js
|
@ -438,7 +438,7 @@ module.exports = function(registry) {
|
|||
http: {verb: 'get', path: '/' + pathName},
|
||||
accepts: {arg: 'refresh', type: 'boolean', http: {source: 'query'}},
|
||||
accessType: 'READ',
|
||||
description: 'Fetches belongsTo relation ' + relationName,
|
||||
description: 'Fetches belongsTo relation ' + relationName + '.',
|
||||
returns: {arg: relationName, type: modelName, root: true}
|
||||
}, fn);
|
||||
};
|
||||
|
@ -462,7 +462,7 @@ module.exports = function(registry) {
|
|||
isStatic: false,
|
||||
http: {verb: 'get', path: '/' + pathName},
|
||||
accepts: {arg: 'refresh', type: 'boolean', http: {source: 'query'}},
|
||||
description: 'Fetches hasOne relation ' + relationName,
|
||||
description: 'Fetches hasOne relation ' + relationName + '.',
|
||||
accessType: 'READ',
|
||||
returns: {arg: relationName, type: relation.modelTo.modelName, root: true},
|
||||
rest: {after: convertNullToNotFoundError.bind(null, toModelName)}
|
||||
|
@ -505,7 +505,7 @@ module.exports = function(registry) {
|
|||
accepts: {arg: 'fk', type: 'any',
|
||||
description: 'Foreign key for ' + relationName, required: true,
|
||||
http: {source: 'path'}},
|
||||
description: 'Find a related item by id for ' + relationName,
|
||||
description: 'Find a related item by id for ' + relationName + '.',
|
||||
accessType: 'READ',
|
||||
returns: {arg: 'result', type: toModelName, root: true},
|
||||
rest: {after: convertNullToNotFoundError.bind(null, toModelName)}
|
||||
|
@ -518,7 +518,7 @@ module.exports = function(registry) {
|
|||
accepts: {arg: 'fk', type: 'any',
|
||||
description: 'Foreign key for ' + relationName, required: true,
|
||||
http: {source: 'path'}},
|
||||
description: 'Delete a related item by id for ' + relationName,
|
||||
description: 'Delete a related item by id for ' + relationName + '.',
|
||||
accessType: 'WRITE',
|
||||
returns: []
|
||||
}, destroyByIdFunc);
|
||||
|
@ -533,7 +533,7 @@ module.exports = function(registry) {
|
|||
http: {source: 'path'}},
|
||||
{arg: 'data', type: toModelName, http: {source: 'body'}}
|
||||
],
|
||||
description: 'Update a related item by id for ' + relationName,
|
||||
description: 'Update a related item by id for ' + relationName + '.',
|
||||
accessType: 'WRITE',
|
||||
returns: {arg: 'result', type: toModelName, root: true}
|
||||
}, updateByIdFunc);
|
||||
|
@ -554,7 +554,7 @@ module.exports = function(registry) {
|
|||
accepts: [{arg: 'fk', type: 'any',
|
||||
description: 'Foreign key for ' + relationName, required: true,
|
||||
http: {source: 'path'}}].concat(accepts),
|
||||
description: 'Add a related item by id for ' + relationName,
|
||||
description: 'Add a related item by id for ' + relationName + '.',
|
||||
accessType: 'WRITE',
|
||||
returns: {arg: relationName, type: modelThrough.modelName, root: true}
|
||||
}, addFunc);
|
||||
|
@ -566,7 +566,7 @@ module.exports = function(registry) {
|
|||
accepts: {arg: 'fk', type: 'any',
|
||||
description: 'Foreign key for ' + relationName, required: true,
|
||||
http: {source: 'path'}},
|
||||
description: 'Remove the ' + relationName + ' relation to an item by id',
|
||||
description: 'Remove the ' + relationName + ' relation to an item by id.',
|
||||
accessType: 'WRITE',
|
||||
returns: []
|
||||
}, removeFunc);
|
||||
|
@ -580,7 +580,7 @@ module.exports = function(registry) {
|
|||
accepts: {arg: 'fk', type: 'any',
|
||||
description: 'Foreign key for ' + relationName, required: true,
|
||||
http: {source: 'path'}},
|
||||
description: 'Check the existence of ' + relationName + ' relation to an item by id',
|
||||
description: 'Check the existence of ' + relationName + ' relation to an item by id.',
|
||||
accessType: 'READ',
|
||||
returns: {arg: 'exists', type: 'boolean', root: true},
|
||||
rest: {
|
||||
|
@ -682,7 +682,7 @@ module.exports = function(registry) {
|
|||
acceptArgs = [
|
||||
{
|
||||
arg: paramName, type: 'any', http: { source: 'path' },
|
||||
description: 'Foreign key for ' + relation.name,
|
||||
description: 'Foreign key for ' + relation.name + '.',
|
||||
required: true
|
||||
}
|
||||
];
|
||||
|
|
|
@ -523,7 +523,7 @@ module.exports = function(registry) {
|
|||
}
|
||||
|
||||
setRemoting(PersistedModel, 'create', {
|
||||
description: 'Create a new instance of the model and persist it into the data source',
|
||||
description: 'Create a new instance of the model and persist it into the data source.',
|
||||
accessType: 'WRITE',
|
||||
accepts: {arg: 'data', type: 'object', description: 'Model instance data', http: {source: 'body'}},
|
||||
returns: {arg: 'data', type: typeName, root: true},
|
||||
|
@ -532,7 +532,7 @@ module.exports = function(registry) {
|
|||
|
||||
setRemoting(PersistedModel, 'upsert', {
|
||||
aliases: ['updateOrCreate'],
|
||||
description: 'Update an existing model instance or insert a new one into the data source',
|
||||
description: 'Update an existing model instance or insert a new one into the data source.',
|
||||
accessType: 'WRITE',
|
||||
accepts: {arg: 'data', type: 'object', description: 'Model instance data', http: {source: 'body'}},
|
||||
returns: {arg: 'data', type: typeName, root: true},
|
||||
|
@ -540,7 +540,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'exists', {
|
||||
description: 'Check whether a model instance exists in the data source',
|
||||
description: 'Check whether a model instance exists in the data source.',
|
||||
accessType: 'READ',
|
||||
accepts: {arg: 'id', type: 'any', description: 'Model id', required: true},
|
||||
returns: {arg: 'exists', type: 'boolean'},
|
||||
|
@ -571,7 +571,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'findById', {
|
||||
description: 'Find a model instance by id from the data source',
|
||||
description: 'Find a model instance by id from the data source.',
|
||||
accessType: 'READ',
|
||||
accepts: {
|
||||
arg: 'id', type: 'any', description: 'Model id', required: true,
|
||||
|
@ -583,7 +583,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'find', {
|
||||
description: 'Find all instances of the model matched by filter from the data source',
|
||||
description: 'Find all instances of the model matched by filter from the data source.',
|
||||
accessType: 'READ',
|
||||
accepts: {arg: 'filter', type: 'object', description: 'Filter defining fields, where, order, offset, and limit'},
|
||||
returns: {arg: 'data', type: [typeName], root: true},
|
||||
|
@ -591,7 +591,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'findOne', {
|
||||
description: 'Find first instance of the model matched by filter from the data source',
|
||||
description: 'Find first instance of the model matched by filter from the data source.',
|
||||
accessType: 'READ',
|
||||
accepts: {arg: 'filter', type: 'object', description: 'Filter defining fields, where, order, offset, and limit'},
|
||||
returns: {arg: 'data', type: typeName, root: true},
|
||||
|
@ -600,7 +600,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'destroyAll', {
|
||||
description: 'Delete all matching records',
|
||||
description: 'Delete all matching records.',
|
||||
accessType: 'WRITE',
|
||||
accepts: {arg: 'where', type: 'object', description: 'filter.where object'},
|
||||
http: {verb: 'del', path: '/'},
|
||||
|
@ -609,7 +609,7 @@ module.exports = function(registry) {
|
|||
|
||||
setRemoting(PersistedModel, 'updateAll', {
|
||||
aliases: ['update'],
|
||||
description: 'Update instances of the model matched by where from the data source',
|
||||
description: 'Update instances of the model matched by where from the data source.',
|
||||
accessType: 'WRITE',
|
||||
accepts: [
|
||||
{arg: 'where', type: 'object', http: {source: 'query'},
|
||||
|
@ -622,7 +622,7 @@ module.exports = function(registry) {
|
|||
|
||||
setRemoting(PersistedModel, 'deleteById', {
|
||||
aliases: ['destroyById', 'removeById'],
|
||||
description: 'Delete a model instance by id from the data source',
|
||||
description: 'Delete a model instance by id from the data source.',
|
||||
accessType: 'WRITE',
|
||||
accepts: {arg: 'id', type: 'any', description: 'Model id', required: true,
|
||||
http: {source: 'path'}},
|
||||
|
@ -630,7 +630,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'count', {
|
||||
description: 'Count instances of the model matched by where from the data source',
|
||||
description: 'Count instances of the model matched by where from the data source.',
|
||||
accessType: 'READ',
|
||||
accepts: {arg: 'where', type: 'object', description: 'Criteria to match model instances'},
|
||||
returns: {arg: 'count', type: 'number'},
|
||||
|
@ -638,7 +638,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel.prototype, 'updateAttributes', {
|
||||
description: 'Update attributes for a model instance and persist it into the data source',
|
||||
description: 'Update attributes for a model instance and persist it into the data source.',
|
||||
accessType: 'WRITE',
|
||||
accepts: {arg: 'data', type: 'object', http: {source: 'body'}, description: 'An object of model property name/value pairs'},
|
||||
returns: {arg: 'data', type: typeName, root: true},
|
||||
|
@ -647,7 +647,7 @@ module.exports = function(registry) {
|
|||
|
||||
if (options.trackChanges || options.enableRemoteReplication) {
|
||||
setRemoting(PersistedModel, 'diff', {
|
||||
description: 'Get a set of deltas and conflicts since the given checkpoint',
|
||||
description: 'Get a set of deltas and conflicts since the given checkpoint.',
|
||||
accessType: 'READ',
|
||||
accepts: [
|
||||
{arg: 'since', type: 'number', description: 'Find deltas since this checkpoint'},
|
||||
|
@ -689,7 +689,7 @@ module.exports = function(registry) {
|
|||
});
|
||||
|
||||
setRemoting(PersistedModel, 'createUpdates', {
|
||||
description: 'Create an update list from a delta list',
|
||||
description: 'Create an update list from a delta list.',
|
||||
// This operation is read-only, it does not change any local data.
|
||||
// It is called by the replication algorithm to compile a list
|
||||
// of changes to apply on the target.
|
||||
|
|
Loading…
Reference in New Issue