diff --git a/TypeGap/GapApiGenerator.cs b/TypeGap/GapApiGenerator.cs index 0c2929d..1727983 100644 --- a/TypeGap/GapApiGenerator.cs +++ b/TypeGap/GapApiGenerator.cs @@ -256,7 +256,7 @@ protected virtual string BuildUrlString(ApiActionDesc action, string template, A part = part.Substring(1); routeParameters.Add(part); - url.Append($"/\" + encodeURIComponent({part}) + \""); + url.Append($"/\" + encodeURIComponent({part} as any) + \""); } foreach (var r in routeParameters) @@ -283,7 +283,7 @@ protected virtual string BuildUrlString(ApiActionDesc action, string template, A if (finalGetParameters.Any()) { url.Append("?"); - url.Append(String.Join("&", finalGetParameters.Select(p => $"{p.ParameterName}=\" + encodeURIComponent({p.ParameterName}) + \""))); + url.Append(String.Join("&", finalGetParameters.Select(p => $"{p.ParameterName}=\" + encodeURIComponent({p.ParameterName} as any) + \""))); } return "\"" + _rewriter(url.ToString().TrimStart('/')) + "\"";