code: func (r *Resource) postProcess(uri string, parent *Resource, resourceTypes map[string]ResourceType,
  	traitsMap map[string]Trait, apiDef *APIDefinition) error {
  	r.URI = strings.TrimSpace(uri)
  	r.Parent = parent
  
  	r.setMethods(traitsMap, apiDef)
  
  	// inherit from resource types
  	if err := r.inheritResourceType(resourceTypes, apiDef); err != nil {
  		return err
  	}
  
  	// process nested/child resources
  	for k := range r.Nested {
  		n := r.Nested[k]
  		if err := n.postProcess(k, r, resourceTypes, traitsMap, apiDef); err != nil {
  			return err
  		}
  		r.Nested[k] = n
  	}
  	return nil
  }
docs: // postProcess doing post processing of a resource after being constructed by the parser.
  // some of the workds:
  // - assign all properties that can't be obtained from RAML document
  // - inherit from resource type
  // - inherit from traits