Merge pull request #2846 from strongloop/fix/metadata-update-delete-all-2x
Fix description of updateAll response
This commit is contained in:
commit
f9cd880eaa
|
@ -795,10 +795,15 @@ 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: {
|
||||||
root: true
|
count: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'The number of instances updated',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
root: true,
|
||||||
},
|
},
|
||||||
http: {verb: 'post', path: '/update'}
|
http: {verb: 'post', path: '/update'}
|
||||||
});
|
});
|
||||||
|
|
|
@ -269,6 +269,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