code: func (sb *SchemaBuilder) BuildParanoid() (*Schema, error) {
  	var ordered []*Type
  	all := make(map[string]*Type)
  	resolved := make(map[string]bool)
  	for _, bt := range namesBaseType {
  		resolved[strings.ToLower(bt)] = true
  	}
  	for _, t := range sb.proto.Types {
  		name, _, _ := TypeInfo(t)
  		all[strings.ToLower(string(name))] = t
  	}
  	for _, t := range sb.proto.Types {
  		name, super, _ := TypeInfo(t)
  		res, err := sb.resolve(ordered, resolved, all, strings.ToLower(string(name)), strings.ToLower(string(super)))
  		if err != nil {
  			return nil, err
  		}
  		ordered = res
  	}
  	sb.proto.Types = ordered
  	return sb.proto, nil
  }
docs: // BuildParanoid build the schema, returns a poiner to it on success, non-nil
  // error otherwise.