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' },
|
description: 'An object of model property name/value pairs' },
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
arg: 'count',
|
arg: 'info',
|
||||||
description: 'The number of instances updated',
|
description: 'Information related to the outcome of the operation',
|
||||||
type: 'object',
|
type: {
|
||||||
|
count: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'The number of instances updated',
|
||||||
|
},
|
||||||
|
},
|
||||||
root: true,
|
root: true,
|
||||||
},
|
},
|
||||||
http: { verb: 'post', path: '/update' },
|
http: { verb: 'post', path: '/update' },
|
||||||
|
|
|
@ -262,6 +262,12 @@ function formatReturns(m) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
var type = returns[0].type;
|
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 : '';
|
return type ? ':' + type : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue