Skip to content

Commit

Permalink
Merge pull request #142 from NSwag/master
Browse files Browse the repository at this point in the history
Release v2.38
  • Loading branch information
RicoSuter committed May 28, 2016
2 parents ccb6962 + 8ec24f8 commit 169515e
Show file tree
Hide file tree
Showing 58 changed files with 2,047 additions and 1,998 deletions.
2 changes: 1 addition & 1 deletion src/NSwag.Annotations/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
[assembly: AssemblyCompany("Rico Suter")]
[assembly: AssemblyProduct("NSwag.Annotations")]
[assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")]
[assembly: AssemblyVersion("2.37.*")]
[assembly: AssemblyVersion("2.38.*")]
4 changes: 2 additions & 2 deletions src/NSwag.AssemblyLoader/NSwag.AssemblyLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NJsonSchema, Version=2.25.5989.40403, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.2.25.5989.40403\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll</HintPath>
<Reference Include="NJsonSchema, Version=2.26.5992.40823, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.2.26.5992.40823\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion src/NSwag.AssemblyLoader/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
[assembly: AssemblyCompany("Rico Suter")]
[assembly: AssemblyProduct("NSwag.AssemblyLoader")]
[assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")]
[assembly: AssemblyVersion("2.37.*")]
[assembly: AssemblyVersion("2.38.*")]
2 changes: 1 addition & 1 deletion src/NSwag.AssemblyLoader/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NJsonSchema" publicKeyToken="c2f9c3bdfae56102" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.24.5988.28092" newVersion="2.24.5988.28092" />
<bindingRedirect oldVersion="0.0.0.0-2.26.5992.40823" newVersion="2.26.5992.40823" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
2 changes: 1 addition & 1 deletion src/NSwag.AssemblyLoader/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
<package id="NJsonSchema" version="2.25.5989.40403" targetFramework="net45" />
<package id="NJsonSchema" version="2.26.5992.40823" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NJsonSchema, Version=2.25.5989.40403, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.2.25.5989.40403\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll</HintPath>
<Reference Include="NJsonSchema, Version=2.26.5992.40823, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.2.26.5992.40823\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NJsonSchema.CodeGeneration, Version=2.25.5989.40404, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.CodeGeneration.2.25.5989.40404\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll</HintPath>
<Reference Include="NJsonSchema.CodeGeneration, Version=2.26.5992.40824, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.CodeGeneration.2.26.5992.40824\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("2.37.*")]
// [assembly: AssemblyVersion("2.38.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 2 additions & 2 deletions src/NSwag.CodeGeneration.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="NJsonSchema" version="2.25.5989.40403" targetFramework="net45" />
<package id="NJsonSchema.CodeGeneration" version="2.25.5989.40404" targetFramework="net45" />
<package id="NJsonSchema" version="2.26.5992.40823" targetFramework="net45" />
<package id="NJsonSchema.CodeGeneration" version="2.26.5992.40824" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public virtual string TransformText()
this.Write(" /// <summary>");

#line 9 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.Summary));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)));

#line default
#line hidden
Expand All @@ -88,7 +88,7 @@ public virtual string TransformText()
this.Write("\">");

#line 11 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Description));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)));

#line default
#line hidden
Expand All @@ -102,7 +102,7 @@ public virtual string TransformText()
this.Write(" /// <returns>");

#line 12 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultDescription));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)));

#line default
#line hidden
Expand Down Expand Up @@ -191,7 +191,7 @@ public virtual string TransformText()
this.Write(" /// <summary>");

#line 17 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.Summary));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)));

#line default
#line hidden
Expand All @@ -218,7 +218,7 @@ public virtual string TransformText()
this.Write("\">");

#line 19 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Description));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)));

#line default
#line hidden
Expand All @@ -240,7 +240,7 @@ public virtual string TransformText()
this.Write(" /// <returns>");

#line 21 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultDescription));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)));

#line default
#line hidden
Expand Down Expand Up @@ -446,7 +446,7 @@ public virtual string TransformText()
this.Write(" /// <summary>");

#line 47 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.Summary));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)));

#line default
#line hidden
Expand All @@ -473,7 +473,7 @@ public virtual string TransformText()
this.Write("\">");

#line 49 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Description));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)));

#line default
#line hidden
Expand All @@ -487,7 +487,7 @@ public virtual string TransformText()
this.Write(" /// <returns>");

#line 50 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultDescription));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)));

#line default
#line hidden
Expand Down Expand Up @@ -603,7 +603,7 @@ public virtual string TransformText()
this.Write(" /// <summary>");

#line 58 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.Summary));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)));

#line default
#line hidden
Expand All @@ -630,7 +630,7 @@ public virtual string TransformText()
this.Write("\">");

#line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(parameter.Description));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)));

#line default
#line hidden
Expand All @@ -652,7 +652,7 @@ public virtual string TransformText()
this.Write(" /// <returns>");

#line 62 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultDescription));
this.Write(this.ToStringHelper.ToStringWithCulture(ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)));

#line default
#line hidden
Expand Down Expand Up @@ -1256,7 +1256,7 @@ public virtual string TransformText()
this.Write(" return default(");

#line 171 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration\CodeGenerators\CSharp\Templates\ClientTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultType));
this.Write(this.ToStringHelper.ToStringWithCulture(operation.ResultType.Substring(5, operation.ResultType.Length - 6)));

#line default
#line hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
public partial interface I<#=Model.Class#>
{
<#foreach(var operation in Model.Operations){#>
<# if(operation.HasSummary){#> /// <summary><#=operation.Summary#></summary>
<# if(operation.HasSummary){#> /// <summary><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)#></summary>
<# }foreach (var parameter in operation.Parameters){#>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=parameter.Description#></param>
<# }}if(operation.HasResultDescription){#> /// <returns><#=operation.ResultDescription#></returns>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)#></param>
<# }}if(operation.HasResultDescription){#> /// <returns><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)#></returns>
<# }#> /// <exception cref="<#=Model.Class#>.SwaggerException">A server side error occurred.</exception>
<# if(operation.IsDeprecated){#> [Obsolete]
<# }#> <#=operation.ResultType#> <#=operation.OperationNameUpper#>Async(<#foreach(var parameter in operation.Parameters){#><#=parameter.Type#> <#=parameter.VariableNameLower#><#if(!parameter.IsLast){#>, <#}}#>);

<# if(operation.HasSummary){#> /// <summary><#=operation.Summary#></summary>
<# if(operation.HasSummary){#> /// <summary><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)#></summary>
<# }foreach (var parameter in operation.Parameters){#>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=parameter.Description#></param>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)#></param>
<# }}#> /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
<# if(operation.HasResultDescription){#> /// <returns><#=operation.ResultDescription#></returns>
<# if(operation.HasResultDescription){#> /// <returns><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)#></returns>
<# }#> /// <exception cref="<#=Model.Class#>.SwaggerException">A server side error occurred.</exception>
<# if(operation.IsDeprecated){#> [Obsolete]
<# }#> <#=operation.ResultType#> <#=operation.OperationNameUpper#>Async(<#foreach(var parameter in operation.Parameters){#><#=parameter.Type#> <#=parameter.VariableNameLower#>, <#}#>CancellationToken cancellationToken);
Expand All @@ -44,22 +44,22 @@ public partial class <#=Model.Class#> <#if(Model.HasBaseType){#>: <#}#><#if(Mode
public string BaseUrl { get; set; }

<#foreach(var operation in Model.Operations){#>
<# if(operation.HasSummary){#> /// <summary><#=operation.Summary#></summary>
<# if(operation.HasSummary){#> /// <summary><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)#></summary>
<# }foreach (var parameter in operation.Parameters){#>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=parameter.Description#></param>
<# }}if(operation.HasResultDescription){#> /// <returns><#=operation.ResultDescription#></returns>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)#></param>
<# }}if(operation.HasResultDescription){#> /// <returns><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)#></returns>
<# }#> /// <exception cref="<#=Model.Class#>.SwaggerException">A server side error occurred.</exception>
<# if(operation.IsDeprecated){#> [Obsolete]
<# }#> public <#=operation.ResultType#> <#=operation.OperationNameUpper#>Async(<#foreach(var parameter in operation.Parameters){#><#=parameter.Type#> <#=parameter.VariableNameLower#><#if(!parameter.IsLast){#>, <#}}#>)
{
return <#=operation.OperationNameUpper#>Async(<#foreach(var parameter in operation.Parameters){#><#=parameter.VariableNameLower#>, <#}#>CancellationToken.None);
}

<# if(operation.HasSummary){#> /// <summary><#=operation.Summary#></summary>
<# if(operation.HasSummary){#> /// <summary><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.Summary, 1)#></summary>
<# }foreach (var parameter in operation.Parameters){#>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=parameter.Description#></param>
<# if(parameter.HasDescription){#> /// <param name="<#=parameter.VariableNameLower#>"><#=ConversionUtilities.ConvertCSharpDocBreaks(parameter.Description, 1)#></param>
<# }}#> /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
<# if(operation.HasResultDescription){#> /// <returns><#=operation.ResultDescription#></returns>
<# if(operation.HasResultDescription){#> /// <returns><#=ConversionUtilities.ConvertCSharpDocBreaks(operation.ResultDescription, 1)#></returns>
<# }#> /// <exception cref="<#=Model.Class#>.SwaggerException">A server side error occurred.</exception>
<# if(operation.IsDeprecated){#> [Obsolete]
<# }#> public async <#=operation.ResultType#> <#=operation.OperationNameUpper#>Async(<#foreach(var parameter in operation.Parameters){#><#=parameter.Type#> <#=parameter.VariableNameLower#>, <#}#>CancellationToken cancellationToken)
Expand Down Expand Up @@ -168,7 +168,7 @@ public partial class <#=Model.Class#> <#if(Model.HasBaseType){#>: <#}#><#if(Mode
<# }#>
<#}else{#>
<# if(operation.HasResultType){#>
return default(<#=operation.ResultType#>);
return default(<#=operation.ResultType.Substring(5, operation.ResultType.Length - 6)#>);
<# }else{#>
return;
<# }#>
Expand Down
Loading

0 comments on commit 169515e

Please sign in to comment.