code: func (r *resource) generate(dir string) error {
  	filename := filepath.Join(dir, r.apiName()+".nim")
  	return commons.GenerateFile(r, "./templates/nim/server_resources_api_nim.tmpl", "server_resources_api_nim", filename, true)
  }
docs: // generate server resource API implementation