code: func AllTypes(apiDef *raml.APIDefinition, pkgName string) map[string]TypeTask {
  	mtt := map[string]TypeTask{}
  
  	// from types
  	for name, tip := range apiDef.Types {
  		mtt[name] = TypeTask{
  			Type: tip,
  			Pkg:  pkgName,
  			Name: name,
  		}
  	}
  
  	for _, endpoints := range getAllEndpoints(apiDef) {
  		for _, ep := range endpoints {
  			tts := getTypesOfEndpoint(ep, pkgName)
  			for _, tt := range tts {
  				mtt[tt.Name] = tt
  			}
  		}
  	}
  	return mtt
  }
docs: // AllTypes returns all TypeTask that need to be generated by the code
  // generator