-
-
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.
Fix string usage and remove extra usings
- Loading branch information
Showing
121 changed files
with
163 additions
and
322 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
// <author>Rico Suter, [email protected]</author> | ||
//----------------------------------------------------------------------- | ||
|
||
using System.Globalization; | ||
using System.Net; | ||
|
||
namespace NSwag.Annotations | ||
|
@@ -37,7 +38,7 @@ public ResponseTypeAttribute(string httpStatusCode, Type responseType) | |
/// <param name="responseType">The JSON result type of the MVC or Web API action method.</param> | ||
public ResponseTypeAttribute(int httpStatusCode, Type responseType) | ||
{ | ||
HttpStatusCode = httpStatusCode.ToString(); | ||
HttpStatusCode = httpStatusCode.ToString(CultureInfo.InvariantCulture); | ||
ResponseType = responseType; | ||
} | ||
|
||
|
@@ -46,7 +47,7 @@ public ResponseTypeAttribute(int httpStatusCode, Type responseType) | |
/// <param name="responseType">The JSON result type of the MVC or Web API action method.</param> | ||
public ResponseTypeAttribute(HttpStatusCode httpStatusCode, Type responseType) | ||
{ | ||
HttpStatusCode = ((int)httpStatusCode).ToString(); | ||
HttpStatusCode = ((int)httpStatusCode).ToString(CultureInfo.InvariantCulture); | ||
ResponseType = responseType; | ||
} | ||
|
||
|
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,6 +6,7 @@ | |
// <author>Rico Suter, [email protected]</author> | ||
//----------------------------------------------------------------------- | ||
|
||
using System.Globalization; | ||
using System.Net; | ||
|
||
namespace NSwag.Annotations | ||
|
@@ -37,7 +38,7 @@ public SwaggerResponseAttribute(string httpStatusCode, Type responseType) | |
/// <param name="responseType">The JSON result type of the MVC or Web API action method.</param> | ||
public SwaggerResponseAttribute(int httpStatusCode, Type responseType) | ||
{ | ||
StatusCode = httpStatusCode.ToString(); | ||
StatusCode = httpStatusCode.ToString(CultureInfo.InvariantCulture); | ||
Type = responseType; | ||
} | ||
|
||
|
@@ -46,7 +47,7 @@ public SwaggerResponseAttribute(int httpStatusCode, Type responseType) | |
/// <param name="responseType">The JSON result type of the MVC or Web API action method.</param> | ||
public SwaggerResponseAttribute(HttpStatusCode httpStatusCode, Type responseType) | ||
{ | ||
StatusCode = ((int)httpStatusCode).ToString(); | ||
StatusCode = ((int)httpStatusCode).ToString(CultureInfo.InvariantCulture); | ||
Type = responseType; | ||
} | ||
|
||
|
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
2 changes: 0 additions & 2 deletions
2
src/NSwag.CodeGeneration.CSharp.Tests/AllowNullableBodyParametersTests.cs
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.CSharp.Tests | ||
{ | ||
|
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
2 changes: 0 additions & 2 deletions
2
src/NSwag.CodeGeneration.CSharp.Tests/CSharpClientSettingsTests.cs
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
3 changes: 1 addition & 2 deletions
3
src/NSwag.CodeGeneration.CSharp.Tests/ControllerGenerationFormatTests.cs
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
3 changes: 1 addition & 2 deletions
3
src/NSwag.CodeGeneration.CSharp.Tests/Controllers/ControllerGenerationBasePathTests.cs
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.CSharp.Tests | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.CSharp.Tests | ||
|
6 changes: 1 addition & 5 deletions
6
src/NSwag.CodeGeneration.CSharp.Tests/OptionalParameterTests.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.CSharp.Tests | ||
{ | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.CSharp.Tests | ||
{ | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.CSharp.Tests | ||
{ | ||
|
5 changes: 1 addition & 4 deletions
5
src/NSwag.CodeGeneration.CSharp.Tests/UseCancellationTokenTests.cs
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
3 changes: 1 addition & 2 deletions
3
src/NSwag.CodeGeneration.TypeScript.Tests/ArrayParameterTests.cs
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit; | ||
|
||
namespace NSwag.CodeGeneration.TypeScript.Tests | ||
{ | ||
|
Oops, something went wrong.