scope: improve description of shared methods

The description is used by client SDK code-generators like
loopback-angularjs.
This commit is contained in:
Miroslav Bajtoš 2014-04-02 19:36:13 +02:00
parent 4da4c65faa
commit d08c6714d8
1 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ function defineScope(cls, targetClass, name, params, methods) {
fn.shared = true;
fn.http = {verb: 'get', path: '/' + name};
fn.accepts = {arg: 'filter', type: 'object'};
fn.description = 'Fetches ' + name;
fn.description = 'Queries ' + name + ' of this model.';
fn.returns = {arg: name, type: 'array', root: true};
cls['__get__' + name] = fn;
@ -134,7 +134,7 @@ function defineScope(cls, targetClass, name, params, methods) {
fn_create.shared = true;
fn_create.http = {verb: 'post', path: '/' + name};
fn_create.accepts = {arg: 'data', type: 'object', http: {source: 'body'}};
fn_create.description = 'Creates ' + name;
fn_create.description = 'Creates a new instance in ' + name + ' of this model.';
fn_create.returns = {arg: 'data', type: 'object', root: true};
cls['__create__' + name] = fn_create;
@ -145,7 +145,7 @@ function defineScope(cls, targetClass, name, params, methods) {
};
fn_delete.shared = true;
fn_delete.http = {verb: 'delete', path: '/' + name};
fn_delete.description = 'Deletes ' + name;
fn_delete.description = 'Deletes all ' + name + ' of this model.';
fn_delete.returns = {arg: 'data', type: 'object', root: true};
cls['__delete__' + name] = fn_delete;