code: function(args) {
      var defaultType = 'string';
      var type = defaultType;
  
      var item = apiSpec.executables[args.executableName] || apiSpec.invokers[args.invokerName];
  
      if (item) {
        if (args.parameterName === '*') {
          type = {};
  
          _.each(item.parameters_schema, function(param, name) {
            type[name] = param.type || defaultType;
          });
        } else if (args.resultName === '*') {
          type = {};
  
          _.each(item.results_schema, function(result, name) {
            type[name] = result.type || defaultType;
          });
        } else if (item.parameters_schema[args.parameterName]) {
          type = item.parameters_schema[args.parameterName].type || defaultType;
        } else if (item.results_schema[args.resultName]) {
          type = item.results_schema[args.resultName].type || defaultType;
        }
      }
  
      if (type === 'binary' && args.preferBase64) {
        type = '__base64_string';
      } else if (_.isPlainObject(type) && args.preferBase64) {
        _.each(type, function(t, name) {
          if (t === 'string') type[name] = 'string';
          else if (t === 'binary') type[name] = '__base64_string';
        });
      }
  
      return type;
    }
docs: Helper funtions