code: func (r *resource) Imports() []string {
  	ip := map[string]struct{}{}
  
  	for _, m := range r.Methods {
  		var names []string
  		if m.ReqBody != "" {
  			names = append(names, m.ReqBody)
  		}
  		if m.RespBody != "" {
  			names = append(names, m.RespBody)
  		}
  		for _, name := range names {
  			if tipe, ok := objectRegistered(name); ok {
  				ip[tipe] = struct{}{}
  			}
  		}
  	}
  	return commons.MapToSortedStrings(ip)
  }
docs: // get array of all imported modules