code: func (apiDef *APIDefinition) PostProcess(workDir, fileName string) error {
  	apiDef.Filename = path.Join(workDir, fileName)
  	// libraries
  	apiDef.Libraries = map[string]*Library{}
  
  	if !isURL(fileName) {
  		workDir = filepath.Join(workDir, filepath.Dir(fileName))
  	}
  
  	for name, path := range apiDef.Uses {
  		lib := &Library{Filename: path}
  		if _, err := ParseReadFile(workDir, path, lib); err != nil {
  			return fmt.Errorf("apiDef.PostProcess() failed to parse library	name=%v, path=%v\n\terr=%v",
  				name, path, err)
  		}
  		apiDef.Libraries[name] = lib
  	}
  
  	// traits
  	for name, t := range apiDef.Traits {
  		t.postProcess(name)
  		apiDef.Traits[name] = t
  	}
  
  	// resource types
  	for name, rt := range apiDef.ResourceTypes {
  		rt.postProcess(name, apiDef.Traits, apiDef)
  		apiDef.ResourceTypes[name] = rt
  	}
  
  	// types
  	for name, t := range apiDef.Types {
  		t.postProcess(name, apiDef)
  		apiDef.Types[name] = t
  	}
  
  	// resources
  	for k := range apiDef.Resources {
  		r := apiDef.Resources[k]
  		rts := apiDef.allResourceTypes(apiDef.ResourceTypes, apiDef.Libraries)
  		trts := apiDef.allTraits(apiDef.Traits, apiDef.Libraries)
  		if err := r.postProcess(k, nil, rts, trts, apiDef); err != nil {
  			return err
  		}
  		apiDef.Resources[k] = r
  	}
  	return nil
  }
docs: // PostProcess doing additional processing
  // that couldn't be done by yaml parser such as :
  // - inheritance
  // - setting some additional values not exist in the .raml
  // - allocate map fields