Merge pull request #2842 from strongloop/fix/metadata-update-delete-all
Fix description of updateAll response
This commit is contained in:
commit
46ab65cf50
|
@ -808,9 +808,14 @@ module.exports = function(registry) {
|
|||
description: 'An object of model property name/value pairs' },
|
||||
],
|
||||
returns: {
|
||||
arg: 'count',
|
||||
description: 'The number of instances updated',
|
||||
type: 'object',
|
||||
arg: 'info',
|
||||
description: 'Information related to the outcome of the operation',
|
||||
type: {
|
||||
count: {
|
||||
type: 'number',
|
||||
description: 'The number of instances updated',
|
||||
},
|
||||
},
|
||||
root: true,
|
||||
},
|
||||
http: { verb: 'post', path: '/update' },
|
||||
|
|
|
@ -262,6 +262,12 @@ function formatReturns(m) {
|
|||
return '';
|
||||
}
|
||||
var type = returns[0].type;
|
||||
|
||||
// handle anonymous type definitions, e.g
|
||||
// { arg: 'info', type: { count: 'number' } }
|
||||
if (typeof type === 'object' && !Array.isArray(type))
|
||||
type = 'object';
|
||||
|
||||
return type ? ':' + type : '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue