code: func (s *Server) generateResources() error {
  	var allMethods []method
  
  	for _, resource := range s.Resources {
  		filename := path.Join(s.TargetDir, fmt.Sprintf("%v_api", strings.ToLower(resource.Name))+".lua")
  
  		if err := commons.GenerateFile(resource, "./templates/tarantool/server_resource_api.tmpl",
  			"server_resource_api", filename, true); err != nil {
  			return err
  		}
  
  		for _, method := range resource.Methods {
  			allMethods = append(allMethods, *method)
  			filename := path.Join(s.TargetDir, handlersDir, method.Handler()+".lua")
  
  			// generate method handler file
  			if err := commons.GenerateFile(method, "./templates/tarantool/server_method_handler.tmpl",
  				"server_method_handler", filename, false); err != nil {
  				return err
  			}
  		}
  	}
  
  	methods := map[string]interface{}{
  		"Methods": allMethods,
  	}
  
  	// Generate handlers file
  	filename := path.Join(s.TargetDir, handlersDir, "handlers.lua")
  	return commons.GenerateFile(methods, "./templates/tarantool/server_handlers.tmpl", "server_handlers", filename, true)
  }
docs: // generateResources generates all resource apis and end point handlers