code: func (pf *field) setType(apiDef *raml.APIDefinition, t, items string) {
  	pt := toPythonType(t)
  	if pt != nil {
  		pf.Type = pt.name
  		if pt.importName != "" {
  			pf.addImport(apiDef, pt.importModule, pt.importName)
  		}
  		return // type already set, no need to go down
  	}
  
  	ramlType := raml.Type{
  		Type:  t,
  		Items: items,
  	}
  	// other types that need some processing
  	switch {
  	case ramlType.IsBidimensiArray(): // bidimensional array
  		log.Info("validator has no support for bidimensional array, ignore it")
  	case ramlType.IsArray(): // array
  		pf.IsList = true
  		pf.setType(apiDef, ramlType.ArrayType(), "")
  	case strings.HasSuffix(t, "{}"): // map
  		log.Info("validator has no support for map, ignore it")
  	case ramlType.IsUnion():
  		// send the list of union types to the template
  		unionTypes, _ := ramlType.Union()
  		for _, typename := range unionTypes {
  			if v, ok := typeMap[typename]; ok {
  				switch typename {
  				case "datetime":
  					pf.addImport(apiDef, "datetime", "datetime")
  				case "uuid":
  					pf.addImport(apiDef, "uuid", "UUID")
  				case "string":
  					pf.addImport(apiDef, "six", "string_types")
  				default:
  					pf.addImport(apiDef, "."+typename, typename)
  				}
  				pf.UnionTypes = append(pf.UnionTypes, v)
  			}
  
  			pf.Type = t
  		}
  	case strings.Index(t, ".") > 1:
  		pf.Type = t[strings.Index(t, ".")+1:]
  	default:
  		pf.Type = t
  		pf.addImport(apiDef, "."+t, t)
  	}
  }
docs: // convert from raml Type to python type