File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -795,10 +795,15 @@ module.exports = function(registry) {
795795 description : 'An object of model property name/value pairs' } ,
796796 ] ,
797797 returns : {
798- arg : 'count' ,
799- description : 'The number of instances updated' ,
800- type : 'object' ,
801- root : true
798+ arg : 'info' ,
799+ description : 'Information related to the outcome of the operation' ,
800+ type : {
801+ count : {
802+ type : 'number' ,
803+ description : 'The number of instances updated' ,
804+ } ,
805+ } ,
806+ root : true ,
802807 } ,
803808 http : { verb : 'post' , path : '/update' }
804809 } ) ;
Original file line number Diff line number Diff line change @@ -269,6 +269,12 @@ function formatReturns(m) {
269269 return '' ;
270270 }
271271 var type = returns [ 0 ] . type ;
272+
273+ // handle anonymous type definitions, e.g
274+ // { arg: 'info', type: { count: 'number' } }
275+ if ( typeof type === 'object' && ! Array . isArray ( type ) )
276+ type = 'object' ;
277+
272278 return type ? ':' + type : '' ;
273279}
274280
You can’t perform that action at this time.
0 commit comments