code: function sendSuccess(res, result, internalCode) {
  	var obj = {
  			success: true,
  			code: res.statusCode,
  			result: result
  		};
  
  	if (internalCode !== undefined) {
  		obj.internalCode = internalCode;
  	}
  
  	if (!res) {
  		return obj;
  	}
  
  	try {
  		return res.send(obj);
  	}
  	catch(e) {
  		console.error('swagger.respond sendSuccess:', e, 'headersSent', res.headersSent);
  		if (res) {
  			res.end(JSON.stringify(obj));
  		}
  	}
  }
docs: /*
  Utility.
   
  Sends a successful response to the server.
  @param res Optional Express Response object.
  @param result The results that are successful and should be sent to the server. If this is a string, it'll be localized.
  @param internalCode An optional internal code to also send to the client. This is useful for programmatic use of the API so we can do non-string-based comparisons.
  @param enableStringLocalize Optional ability to enable localization of simple strings returned as success responses.
  @return {*} If no res is provided, the success JSON object will be returned; otherwise, the results of res.send are returned.