File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -808,9 +808,14 @@ module.exports = function(registry) {
808808 description : 'An object of model property name/value pairs' } ,
809809 ] ,
810810 returns : {
811- arg : 'count' ,
812- description : 'The number of instances updated' ,
813- type : 'object' ,
811+ arg : 'info' ,
812+ description : 'Information related to the outcome of the operation' ,
813+ type : {
814+ count : {
815+ type : 'number' ,
816+ description : 'The number of instances updated' ,
817+ } ,
818+ } ,
814819 root : true ,
815820 } ,
816821 http : { verb : 'post' , path : '/update' } ,
Original file line number Diff line number Diff line change @@ -262,6 +262,12 @@ function formatReturns(m) {
262262 return '' ;
263263 }
264264 var type = returns [ 0 ] . type ;
265+
266+ // handle anonymous type definitions, e.g
267+ // { arg: 'info', type: { count: 'number' } }
268+ if ( typeof type === 'object' && ! Array . isArray ( type ) )
269+ type = 'object' ;
270+
265271 return type ? ':' + type : '' ;
266272}
267273
You can’t perform that action at this time.
0 commit comments