code: func mergeTypeName(name, rtName string, apiDef *APIDefinition) string {
  	if apiDef == nil {
  		log.Warning("passing nil API definition to mergeTypeName")
  		return name
  	}
  
  	// check if this resource type is in library
  	splt := strings.Split(rtName, ".")
  	if len(splt) < 2 {
  		// if not in library, we need to do nothing
  		return name
  	}
  
  	// get the library object from API definition root object
  	libName := splt[0]
  	lib, ok := apiDef.Libraries[libName]
  	if !ok {
  		return name
  	}
  
  	// type not exist in the library
  	if _, ok := lib.Types[name]; !ok {
  		return name
  	}
  
  	return strings.Join([]string{libName, name}, ".")
  }
docs: // merge name of type with resource type name.