Skip to content

Commit

Permalink
Merge pull request #85 from NSwag/master
Browse files Browse the repository at this point in the history
Release v2.16
  • Loading branch information
RicoSuter committed May 4, 2016
2 parents ca7b216 + b11ecb4 commit 69f746c
Show file tree
Hide file tree
Showing 22 changed files with 818 additions and 1,016 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.15.*")]
[assembly: AssemblyVersion("2.16.*")]
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.15.*")]
// [assembly: AssemblyVersion("2.16.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion src/NSwag.CodeGeneration/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.CodeGeneration")]
[assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")]
[assembly: AssemblyVersion("2.15.*")]
[assembly: AssemblyVersion("2.16.*")]
2 changes: 1 addition & 1 deletion src/NSwag.Core/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")]
[assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")]
[assembly: AssemblyVersion("2.15.*")]
[assembly: AssemblyVersion("2.16.*")]
2 changes: 1 addition & 1 deletion src/NSwag.Demo.Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,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.15.*")]
// [assembly: AssemblyVersion("2.16.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion src/NSwag.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.15.*")]
// [assembly: AssemblyVersion("2.16.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion src/NSwag/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.Console")]
[assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")]
[assembly: AssemblyVersion("2.15.*")]
[assembly: AssemblyVersion("2.16.*")]
1,170 changes: 585 additions & 585 deletions src/NSwagStudio.Installer/Generated.wxs

Large diffs are not rendered by default.

20 changes: 3 additions & 17 deletions src/NSwagStudio/NSwagDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
// <author>Rico Suter, [email protected]</author>
//-----------------------------------------------------------------------

using System;
using System.IO;
using System.Text;
using MyToolkit.Model;
using Newtonsoft.Json;
using NSwag.Commands;
Expand Down Expand Up @@ -56,15 +54,9 @@ public static NSwagDocument LoadDocument(string filePath)
public void Save()
{
ConvertToRelativePaths();

var previousAssemblyTypeAssemblyPath = AssemblyTypeToSwaggerCommand.AssemblyPath;
if (!string.IsNullOrEmpty(previousAssemblyTypeAssemblyPath))
AssemblyTypeToSwaggerCommand.AssemblyPath = PathUtilities.MakeRelativePath(AssemblyTypeToSwaggerCommand.AssemblyPath, System.IO.Path.GetDirectoryName(Path));


_latestData = JsonConvert.SerializeObject(this, Formatting.Indented);

ConvertToAbsolutePaths();

File.WriteAllText(Path, _latestData);
}

Expand Down Expand Up @@ -118,16 +110,10 @@ public string Path
}

[JsonIgnore]
public string Name
{
get { return System.IO.Path.GetFileName(Path); }
}
public string Name => System.IO.Path.GetFileName(Path);

[JsonIgnore]
public bool IsDirty
{
get { return _latestData != JsonConvert.SerializeObject(this, Formatting.Indented); }
}
public bool IsDirty => _latestData != JsonConvert.SerializeObject(this, Formatting.Indented);

/// <summary>Gets or sets the selected Swagger generator. </summary>
[JsonProperty("SelectedSwaggerGenerator")]
Expand Down
1 change: 0 additions & 1 deletion src/NSwagStudio/NSwagStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
</ApplicationDefinition>
<Compile Include="ISwaggerGenerator.cs" />
<Compile Include="NSwagDocument.cs" />
<Compile Include="Utilities\MyFileOpenHandler.cs" />
<Compile Include="Utilities\PathUtilities.cs" />
<Compile Include="ViewModels\CodeGenerators\CSharpWebApiControllerGeneratorViewModel.cs" />
<Compile Include="ViewModels\CodeGenerators\SwaggerGeneratorViewModel.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/NSwagStudio/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("NSwagStudio")]
[assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")]
[assembly: AssemblyVersion("2.15.*")]
[assembly: AssemblyVersion("2.16.*")]
162 changes: 0 additions & 162 deletions src/NSwagStudio/Utilities/MyFileOpenHandler.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/NSwagStudio/Utilities/PathUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static string MakeRelativePath(string absPath, string relTo)

// If we didn't find a common prefix then throw
if (lastCommonRoot == -1)
throw new ArgumentException("The path of the two files doesn't have any common base.");
return absPath;

// Build up the relative path
var relativePath = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ await Task.Run(async () =>
}
});

ClientCode = code;
ClientCode = code ?? string.Empty;
});
}

Expand Down
Loading

0 comments on commit 69f746c

Please sign in to comment.