Skip to content

Commit 80ca4e3

Browse files
committed
Fix double using directive. Use Verify for snapshots.
1 parent 53a3168 commit 80ca4e3

File tree

17 files changed

+86
-87
lines changed

17 files changed

+86
-87
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,4 +339,6 @@ ASALocalRun/
339339
# BeatPulse healthcheck temp database
340340
healthchecksdb
341341

342-
/GenerateAspNetCoreClient/Properties/debug-paths.txt
342+
/GenerateAspNetCoreClient/Properties/debug-paths.txt
343+
344+
*.received.*

GenerateAspNetCoreClient.Command/GenerateAspNetCoreClient.Command.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
14-
<PackageReference Include="Namotion.Reflection" Version="3.2.0" />
14+
<PackageReference Include="Namotion.Reflection" Version="3.4.2" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

GenerateAspNetCoreClient.Command/GenerateClientCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ private static IEnumerable<string> GetImportedNamespaces(Client clientModel, Has
126126
var namespaces = GetNamespaces(clientModel.EndpointMethods, ambiguousTypes)
127127
.Concat(options.AdditionalNamespaces);
128128

129-
if (options.AddCancellationTokenParameters)
130-
namespaces = namespaces.Append("System.Threading");
131-
132129
namespaces = namespaces
133130
.OrderByDescending(ns => ns.StartsWith("System"))
134131
.ThenBy(ns => ns);

Tests/GenerateAspNetCoreClient.Tests/__snapshots__/TestWebApi.Controllers.UseApiResponses/IWeatherForecastApi.cs.snap renamed to Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.GenerationTest_UseApiResponses/IWeatherForecastApi.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//<auto-generated />
1+
//<auto-generated />
22

33
using System.Collections.Generic;
44
using System.Threading.Tasks;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//<auto-generated />
2+
3+
using System.Threading;
4+
using System.Threading.Tasks;
5+
using Refit;
6+
using TestWebApi.Models;
7+
8+
namespace Test.Name.Space
9+
{
10+
public partial interface ITestWebApiMinimalApiApi
11+
{
12+
[Post("/weather-forecast")]
13+
Task<IApiResponse> PostWeatherForecast([Body] WeatherForecast forecast, CancellationToken cancellationToken = default);
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//<auto-generated />
2+
3+
using System.Threading;
4+
using System.Threading.Tasks;
5+
using Refit;
6+
using TestWebApi.Models;
7+
8+
namespace Test.Name.Space
9+
{
10+
public partial interface IWeatherForecastApi
11+
{
12+
[Get("/weather-forecast")]
13+
Task<IApiResponse<WeatherForecastRecord[]>> GetWeatherForecast(CancellationToken cancellationToken = default);
14+
15+
[Get("/weather-forecast/with-name")]
16+
Task<IApiResponse<WeatherForecastRecord>> GetSomeWeather(int days, CancellationToken cancellationToken = default);
17+
}
18+
}

Tests/GenerateAspNetCoreClient.Tests/__snapshots__/TestWebApi.Controllers/IAnotherTestApi.cs.snap renamed to Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.GenerationTest_testProjectName=TestWebApi.Controllers/IAnotherTestApi.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//<auto-generated />
1+
//<auto-generated />
22

33
using System;
44
using System.Threading.Tasks;

Tests/GenerateAspNetCoreClient.Tests/__snapshots__/TestWebApi.Controllers/IWeatherForecastApi.cs.snap renamed to Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.GenerationTest_testProjectName=TestWebApi.Controllers/IWeatherForecastApi.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//<auto-generated />
1+
//<auto-generated />
22

33
using System;
44
using System.Collections.Generic;

Tests/GenerateAspNetCoreClient.Tests/__snapshots__/TestWebApi.MinimalApi/ITestWebApiMinimalApiApi.cs.snap renamed to Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.GenerationTest_testProjectName=TestWebApi.MinimalApi/ITestWebApiMinimalApiApi.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//<auto-generated />
1+
//<auto-generated />
22

33
using System.Threading.Tasks;
44
using Refit;

Tests/GenerateAspNetCoreClient.Tests/__snapshots__/TestWebApi.MinimalApi/IWeatherForecastApi.cs.snap renamed to Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.GenerationTest_testProjectName=TestWebApi.MinimalApi/IWeatherForecastApi.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//<auto-generated />
1+
//<auto-generated />
22

33
using System.Threading.Tasks;
44
using Refit;

0 commit comments

Comments
 (0)