diff --git a/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.cs b/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.cs index 818b682227..fda5e3d04c 100644 --- a/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.cs +++ b/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.cs @@ -11,13 +11,14 @@ namespace NSwag.CodeGeneration.CodeGenerators.TypeScript.Templates { using NJsonSchema.CodeGeneration; using NSwag.CodeGeneration.CodeGenerators.TypeScript; + using System.Linq; using System; /// /// Class to produce the template output /// - #line 1 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 1 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "14.0.0.0")] internal partial class AngularJSClientTemplate : AngularJSClientTemplateBase { @@ -27,229 +28,230 @@ internal partial class AngularJSClientTemplate : AngularJSClientTemplateBase /// public virtual string TransformText() { + this.Write("\r\n"); - #line 5 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 7 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.HasOperations){ #line default #line hidden - #line 6 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 8 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.GenerateClientInterfaces){ #line default #line hidden this.Write("export interface I"); - #line 7 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 9 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.Class)); #line default #line hidden this.Write(" {\r\n"); - #line 8 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 10 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var operation in Model.Operations){ #line default #line hidden - #line 9 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 11 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasDocumentation){ #line default #line hidden this.Write(" /**\r\n"); - #line 10 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 12 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasSummary){ #line default #line hidden this.Write(" * "); - #line 10 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 12 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Summary)); #line default #line hidden this.Write("\r\n"); - #line 11 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 13 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 11 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 13 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.Parameters){ #line default #line hidden - #line 12 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 14 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(parameter.HasDescription){ #line default #line hidden this.Write(" * @"); - #line 12 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 14 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" "); - #line 12 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 14 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Description ?? "")); #line default #line hidden this.Write("\r\n"); - #line 13 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 15 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 13 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 15 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 13 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 15 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasResultDescription){ #line default #line hidden this.Write(" * @return "); - #line 13 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 15 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultDescription)); #line default #line hidden this.Write("\r\n"); - #line 14 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 16 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 14 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 16 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.IsDeprecated){ #line default #line hidden this.Write(" * @deprecated\r\n"); - #line 15 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 17 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" */\r\n"); - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" "); - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.OperationNameLower)); #line default #line hidden this.Write("("); - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.Parameters){ #line default #line hidden - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(": "); - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Type)); #line default #line hidden - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(!parameter.IsLast){ #line default #line hidden this.Write(", "); - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("): ng.IPromise<"); - #line 16 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 18 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultType)); #line default #line hidden this.Write(">;\r\n"); - #line 17 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 19 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("}\r\n"); - #line 18 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 20 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("\r\nexport class "); - #line 20 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 22 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.Class)); #line default #line hidden this.Write(" "); - #line 20 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 22 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.GenerateClientInterfaces){ #line default #line hidden this.Write("implements I"); - #line 20 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 22 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.Class)); #line default #line hidden this.Write(" "); - #line 20 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 22 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default @@ -263,14 +265,14 @@ public virtual string TransformText() this.http = $http; this.baseUrl = baseUrl !== undefined ? baseUrl : """); - #line 27 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 29 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.BaseUrl)); #line default #line hidden this.Write("\"; \r\n this.jsonParseReviver = jsonParseReviver;\r\n }\r\n"); - #line 30 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 32 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.IsExtended){ #line default @@ -279,318 +281,331 @@ public virtual string TransformText() "\r\n\r\n protected transformResult(url: string, response: any, processor: (respon" + "se: any) => any) {\r\n return processor(response);\r\n }\r\n"); - #line 39 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 41 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 40 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 42 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var operation in Model.Operations){ #line default #line hidden this.Write("\r\n"); - #line 42 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 44 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasDocumentation){ #line default #line hidden this.Write(" /**\r\n"); - #line 43 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 45 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasSummary){ #line default #line hidden this.Write(" * "); - #line 43 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 45 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Summary)); #line default #line hidden this.Write("\r\n"); - #line 44 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 46 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 44 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 46 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.Parameters){ #line default #line hidden - #line 45 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 47 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(parameter.HasDescription){ #line default #line hidden this.Write(" * @"); - #line 45 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 47 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" "); - #line 45 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 47 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Description ?? "")); #line default #line hidden this.Write("\r\n"); - #line 46 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 48 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 46 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 48 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 46 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 48 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasResultDescription){ #line default #line hidden this.Write(" * @return "); - #line 46 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 48 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultDescription)); #line default #line hidden this.Write("\r\n"); - #line 47 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 49 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 47 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 49 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.IsDeprecated){ #line default #line hidden this.Write(" * @deprecated\r\n"); - #line 48 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 50 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" */\r\n"); - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" "); - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.OperationNameLower)); #line default #line hidden this.Write("("); - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.Parameters){ #line default #line hidden - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(": "); - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Type)); #line default #line hidden - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(!parameter.IsLast){ #line default #line hidden this.Write(", "); - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("): ng.IPromise<"); - #line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 51 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultType)); #line default #line hidden this.Write("> {\r\n var url = this.baseUrl + \"/"); - #line 50 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 52 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Path)); #line default #line hidden - this.Write("?\"; \r\n\r\n"); - #line 52 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 52 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" +if(operation.PathParameters.Any()){ + + #line default + #line hidden + this.Write("?"); + + #line 52 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + } + + #line default + #line hidden + this.Write("\"; \r\n\r\n"); + + #line 54 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.PathParameters){ #line default #line hidden this.Write(" if ("); - #line 53 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 55 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" === undefined || "); - #line 53 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 55 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" === null)\r\n throw new Error(\"The parameter \'"); - #line 54 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 56 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write("\' must be defined.\");\r\n"); - #line 55 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 57 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(parameter.IsDateArray){ #line default #line hidden this.Write(" url = url.replace(\"{"); - #line 56 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 58 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("}\", encodeURIComponent("); - #line 56 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 58 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(".map(s_ => s_.toJSON()).join())); \r\n"); - #line 57 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 59 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else if(parameter.IsDate){ #line default #line hidden this.Write(" url = url.replace(\"{"); - #line 58 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 60 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("}\", encodeURIComponent(\"\" + "); - #line 58 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 60 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(".toJSON())); \r\n"); - #line 59 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 61 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else if(parameter.IsArray){ #line default #line hidden this.Write(" url = url.replace(\"{"); - #line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 62 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("}\", encodeURIComponent("); - #line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 62 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(".join())); \r\n"); - #line 61 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 63 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" url = url.replace(\"{"); - #line 62 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 64 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("}\", encodeURIComponent(\"\" + "); - #line 62 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 64 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(")); \r\n"); - #line 63 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 65 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 64 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 66 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("\r\n"); - #line 66 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 68 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.QueryParameters){ #line default #line hidden - #line 67 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 69 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if (parameter.IsRequired) { if(parameter.IsNullable){ @@ -598,49 +613,49 @@ public virtual string TransformText() #line hidden this.Write(" if ("); - #line 69 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 71 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" === undefined)\r\n throw new Error(\"The parameter \'"); - #line 70 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 72 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write("\' must be defined.\");\r\n else\r\n"); - #line 72 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 74 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" if ("); - #line 73 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 75 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" === undefined || "); - #line 73 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 75 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" === null)\r\n throw new Error(\"The parameter \'"); - #line 74 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 76 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write("\' must be defined and cannot be null.\");\r\n else\r\n"); - #line 76 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 78 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } }else{ if(parameter.IsNullable){ @@ -649,133 +664,133 @@ public virtual string TransformText() #line hidden this.Write(" if ("); - #line 79 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 81 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" !== undefined)\r\n"); - #line 80 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 82 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" if ("); - #line 81 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 83 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" === null)\r\n throw new Error(\"The parameter \'"); - #line 82 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 84 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write("\' cannot be null.\");\r\n else if ("); - #line 83 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 85 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(" !== undefined)\r\n"); - #line 84 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 86 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } } #line default #line hidden - #line 86 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 88 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(parameter.IsDateArray){ #line default #line hidden this.Write(" "); - #line 87 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 89 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(".forEach(item => { url += \""); - #line 87 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 89 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("=\" + encodeURIComponent(\"\" + item.toJSON()) + \"&\"; });\r\n"); - #line 88 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 90 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else if(parameter.IsDate){ #line default #line hidden this.Write(" url += \""); - #line 89 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 91 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("=\" + encodeURIComponent(\"\" + "); - #line 89 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 91 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(".toJSON()) + \"&\"; \r\n"); - #line 90 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 92 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else if(parameter.IsArray){ #line default #line hidden this.Write(" "); - #line 91 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 93 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(".forEach(item => { url += \""); - #line 91 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 93 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("=\" + encodeURIComponent(\"\" + item) + \"&\"; });\r\n"); - #line 92 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 94 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" url += \""); - #line 93 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 95 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("=\" + encodeURIComponent(\"\" + "); - #line 93 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 95 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(") + \"&\"; \r\n"); - #line 94 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 96 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } } @@ -783,28 +798,28 @@ public virtual string TransformText() #line hidden this.Write("\r\n "); - #line 97 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 99 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(RequestBodyGenerator.Render(operation.ContentParameter, 2))); #line default #line hidden this.Write("\r\n\r\n return this.http("); - #line 99 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 101 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.IsExtended){ #line default #line hidden this.Write("this.transformOptions("); - #line 99 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 101 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("{\r\n url: url,\r\n method: \""); - #line 101 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 103 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.HttpMethodUpper)); #line default @@ -812,28 +827,28 @@ public virtual string TransformText() this.Write("\",\r\n data: content,\r\n transformResponse: [], \r\n " + "headers: {\r\n"); - #line 105 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 107 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var parameter in operation.HeaderParameters){ #line default #line hidden this.Write(" \""); - #line 106 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 108 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Name)); #line default #line hidden this.Write("\": "); - #line 106 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 108 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameter.VariableNameLower)); #line default #line hidden this.Write(", \r\n"); - #line 107 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 109 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default @@ -841,21 +856,21 @@ public virtual string TransformText() this.Write(" \"Content-Type\": \"application/json; charset=UTF-8\"\r\n }\r" + "\n }"); - #line 109 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 111 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.IsExtended){ #line default #line hidden this.Write(")"); - #line 109 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 111 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(").then((response) => {\r\n"); - #line 110 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 112 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(Model.IsExtended){ #line default @@ -863,35 +878,35 @@ public virtual string TransformText() this.Write(" return this.transformResult(url, response, (response) => this.process" + ""); - #line 111 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 113 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.OperationNameUpper)); #line default #line hidden this.Write("(response));\r\n"); - #line 112 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 114 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" return this.process"); - #line 113 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 115 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.OperationNameUpper)); #line default #line hidden this.Write("(response);\r\n"); - #line 114 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 116 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" });\r\n }\r\n\r\n private process"); - #line 118 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 120 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.OperationNameUpper)); #line default @@ -899,144 +914,144 @@ public virtual string TransformText() this.Write("(response: any) {\r\n var data = response.data;\r\n var status = respon" + "se.status; \r\n\r\n"); - #line 122 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 124 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" foreach(var response in operation.Responses){ #line default #line hidden this.Write(" if (status === "); - #line 123 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 125 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write(") {\r\n"); - #line 124 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 126 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(response.HasType){ #line default #line hidden this.Write(" var result"); - #line 125 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 127 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write(": "); - #line 125 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 127 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.Type)); #line default #line hidden this.Write(" = null; \r\n"); - #line 126 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 128 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(response.IsDate){ #line default #line hidden this.Write(" result"); - #line 127 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 129 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write(" = new Date(data);\r\n"); - #line 128 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 130 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden - #line 129 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 131 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(response.UseDtoClass){ #line default #line hidden this.Write(" var resultData"); - #line 130 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 132 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write(" = data === \"\" ? null : JSON.parse(data, this.jsonParseReviver);\r\n "); - #line 131 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 133 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.Tab(response.DataConversionCode, 3))); #line default #line hidden this.Write("\r\n"); - #line 132 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 134 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" result"); - #line 133 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 135 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write(" = data === \"\" ? null : <"); - #line 133 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 135 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.Type)); #line default #line hidden this.Write(">JSON.parse(data, this.jsonParseReviver);\r\n"); - #line 134 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 136 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 135 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 137 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 136 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 138 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(response.IsSuccess){ #line default #line hidden this.Write(" return result"); - #line 137 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 139 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write("; \r\n"); - #line 138 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 140 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" throw result"); - #line 139 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 141 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(response.StatusCode)); #line default #line hidden this.Write("; \r\n"); - #line 140 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 142 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } } @@ -1044,41 +1059,41 @@ public virtual string TransformText() #line hidden this.Write(" }\r\n else\r\n"); - #line 144 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 146 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" {\r\n"); - #line 146 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 148 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasDefaultResponse){ #line default #line hidden this.Write(" var result: "); - #line 147 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 149 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.DefaultResponse.Type)); #line default #line hidden this.Write(" = null; \r\n"); - #line 148 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 150 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.DefaultResponse.IsDate){ #line default #line hidden this.Write(" result = new Date(data);\r\n"); - #line 150 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 152 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden - #line 151 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 153 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.DefaultResponse.UseDtoClass){ #line default @@ -1086,54 +1101,54 @@ public virtual string TransformText() this.Write(" var resultData = data === \"\" ? null : JSON.parse(data, this.jsonParse" + "Reviver);\r\n "); - #line 153 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 155 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.Tab(operation.DefaultResponse.DataConversionCode, 3))); #line default #line hidden this.Write("\r\n"); - #line 154 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 156 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" result = data === \"\" ? null : <"); - #line 155 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 157 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.DefaultResponse.Type)); #line default #line hidden this.Write(">JSON.parse(data, this.jsonParseReviver);\r\n"); - #line 156 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 158 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 157 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 159 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden - #line 158 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 160 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.DefaultResponse.IsSuccess){ #line default #line hidden this.Write(" return result; \r\n"); - #line 160 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 162 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" }else{ #line default #line hidden this.Write(" throw result; \r\n"); - #line 162 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 164 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } }else{ @@ -1141,21 +1156,21 @@ public virtual string TransformText() #line hidden this.Write(" throw \"error_no_callback_for_the_received_http_status\"; \r\n"); - #line 165 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 167 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write(" }\r\n }\r\n"); - #line 168 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 170 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default #line hidden this.Write("}\r\n"); - #line 169 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" + #line 171 "C:\projects\Own\Forked\NSwag\src\NSwag.CodeGeneration\CodeGenerators\TypeScript\Templates\AngularJSClientTemplate.tt" } #line default diff --git a/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.tt b/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.tt index b203d6c12b..9b662c6445 100644 --- a/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.tt +++ b/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/Templates/AngularJSClientTemplate.tt @@ -2,6 +2,8 @@ <#@ assembly name="System.Core" #> <#@ import namespace="NJsonSchema.CodeGeneration" #> <#@ import namespace="NSwag.CodeGeneration.CodeGenerators.TypeScript" #> +<#@ import namespace="System.Linq" #> + <#if(Model.HasOperations){#> <#if(Model.GenerateClientInterfaces){#> export interface I<#=Model.Class#> { @@ -47,7 +49,7 @@ export class <#=Model.Class#> <#if(Model.GenerateClientInterfaces){#>implements <#}#><#if(operation.IsDeprecated){#> * @deprecated <#}#> */ <#}#> <#=operation.OperationNameLower#>(<#foreach(var parameter in operation.Parameters){#><#=parameter.VariableNameLower#>: <#=parameter.Type#><#if(!parameter.IsLast){#>, <#}#><#}#>): ng.IPromise<<#=operation.ResultType#>> { - var url = this.baseUrl + "/<#=operation.Path#>?"; + var url = this.baseUrl + "/<#=operation.Path#><#if(operation.PathParameters.Any()){#>?<# } #>"; <#foreach(var parameter in operation.PathParameters){#> if (<#=parameter.VariableNameLower#> === undefined || <#=parameter.VariableNameLower#> === null)