-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from NSwag/master
Release v2.16
- Loading branch information
Showing
22 changed files
with
818 additions
and
1,016 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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); | ||
} | ||
|
||
|
@@ -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")] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ await Task.Run(async () => | |
} | ||
}); | ||
|
||
ClientCode = code; | ||
ClientCode = code ?? string.Empty; | ||
}); | ||
} | ||
|
||
|
Oops, something went wrong.