     i++
   _.uniq(result)
 
+getFakeText = (fieldName, maxLength) ->
+  if maxLength
+    return makeFakeText(maxLength, Math.round(maxLength / 10))
+  makeFakeText()
+
 AutoForm.Fixtures = {}
 
-AutoForm.Fixtures.getData = (ss) ->
+AutoForm.Fixtures.getPreData = (ss, getFakeTextCallback) ->
+  getFakeTextCallback = getFakeTextCallback || getFakeText
   result = {}
   schema = ss.schema()
   for k of schema

makeText = (len, count) ->
  len = len || 21
  count = +count
  text = ""

    if field.type.name is "Boolean"
      result[k] = !!Math.round(Math.random())
      continue
  result

AutoForm.Fixtures.normalizeData = (result) ->
  normalData = {}
  for k of result
    namespace = k.split(".")
    # stupid code, sorry
    if namespace.length is 1
      normalData[namespace[0]] = result[k]
    else if namespace.length is 2
      normalData[namespace[0]][namespace[1]] = result[k]
    else if namespace.length is 3
      normalData[namespace[0]][namespace[1]][namespace[2]] = result[k]
    else
      throw new Error("Current version is support only 3 level of namespace")
  normalData

AutoForm.Fixtures.getData = (ss, getFakeTextCallback) ->
  result = AutoForm.Fixtures.getPreData(ss, getFakeTextCallback)
  AutoForm.Fixtures.normalizeData(result)
