lib/types.js
function array_jsonSchema(name) {
  var result = {};
  var itemName;

  itemName = 'itemOf_' + name;

  result.type = 'array';
  if (this.options.required) result.__required = true;

  if (this.schema) {
    result.items = this.schema.jsonSchema(itemName);
  } else {
    result.items = this.caster.jsonSchema(itemName);
  }

  if (result.items.__required) {
    result.minItems = 1;
  }

  __processOptions(result, this.options);
  delete result.items.__required;

  return result;
}
function array_jsonSchema(name) {
  var result = {};
  var itemName;

  itemName = 'itemOf_' + name;

  result.type = 'array';
  if (this.options.required) result.__required = true;

  if (this.schema) {
    result.items = this.schema.jsonSchema(itemName);
  } else {
    result.items = this.caster.jsonSchema(itemName);
  }

  if (result.items.__required) {
    result.minItems = 1;
  }

  __processOptions(result, this.options);
  delete result.items.__required;

  return result;
}
function array_jsonSchema ( name ) { var result = { } ; var itemName ; itemName = 'itemOf_' + name ; result . type = 'array' ; if ( this . options . required ) result . __required = true ; if ( this . schema ) { result . items = this . schema . jsonSchema ( itemName ) ; } else { result . items = this . caster . jsonSchema ( itemName ) ; } if ( result . items . __required ) { result . minItems = 1 ; } __processOptions ( result , this . options ) ; delete result . items . __required ; return result ; }
array_jsonSchema - returns jsonSchema for array parameters

@memberof mongoose.Schema.Types.SchemaArray
@memberof mongoose.Schema.Types.DocumentArray

@param  {String} name parameter name
@return {object}      json schema
array_jsonSchema - returns jsonSchema for array parameters