   o
 
 
+# type = object
 generate.object = (schema, method = 'all', depth = 0) ->
   o = {}
   for key, prop of schema.properties

  return o


generate.null = () ->
  null


generate.any = (schema, method = 'all', depth = 0) ->
  types = ['string', 'number', 'integer', 'boolean', 'object', 'null']
  randomOptions =

  random 'number', randomOptions


# type = string
generate.string = (schema, method = 'all', depth = 0) ->
  return randexp schema.pattern  if schema.pattern
  # FIXME format should not be ignored
  randomOptions =
    minLength: schema.minLength
    maxLength: schema.maxLength
  random 'string', randomOptions


# type = array
generate.array = (schema, method = 'all', depth = 0) ->
  o = []
  if type(schema.items) is 'array' and schema.items.length
    for itemSchema in schema.items
      o.push generate itemSchema, method, depth + 1

  if schema.additionalItems
    if type(schema.minItems) isnt 'undefined'
      minimum = schema.minItems - o.length
    else
