private void GenerateProxyScripts() { var generationModel = new ApiProxyGenerationModel(); generationModel.Normalize(); var script = ApiProxyScriptManager.GetScript(generationModel.CreateOptions()); string scriptPath = $"{Directory.GetCurrentDirectory()}\\wwwroot\\scripts\\"; System.IO.Directory.CreateDirectory(scriptPath); System.IO.File.WriteAllText(System.IO.Path.Combine(scriptPath, "getall.js"), script); }
public ContentResult GetAll(ApiProxyGenerationModel model) { var script = _proxyScriptManager.GetScript(model.CreateOptions()); return(Content(script, "application/x-javascript")); }