Skip to content

Commit c7eff0a

Browse files
committed
Process feedback
1 parent e835b33 commit c7eff0a

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

src/JsonApiDotNetCore.OpenApi.Client/ApiException.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,4 @@ public ApiException(string message, int statusCode, string? response, IReadOnlyD
2222
Response = response;
2323
Headers = headers;
2424
}
25-
26-
public override string ToString()
27-
{
28-
return $"HTTP Response: \n\n{Response}\n\n{base.ToString()}";
29-
}
3025
}

test/OpenApiTests/NamingConventions/CamelCase/CamelCaseTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
namespace OpenApiTests.NamingConventions.CamelCase;
66

7-
public sealed class PascalCaseTests
7+
public sealed class CamelCaseTests
88
: IClassFixture<OpenApiTestContext<CamelCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext>>
99
{
1010
private readonly OpenApiTestContext<CamelCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext> _testContext;
1111

12-
public PascalCaseTests(OpenApiTestContext<CamelCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext> testContext)
12+
public CamelCaseTests(OpenApiTestContext<CamelCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext> testContext)
1313
{
1414
_testContext = testContext;
1515

test/OpenApiTests/NamingConventions/KebabCase/KebabCaseTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
namespace OpenApiTests.NamingConventions.KebabCase;
66

7-
public sealed class PascalCaseTests
7+
public sealed class KebabCaseTests
88
: IClassFixture<OpenApiTestContext<KebabCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext>>
99
{
1010
private readonly OpenApiTestContext<KebabCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext> _testContext;
1111

12-
public PascalCaseTests(OpenApiTestContext<KebabCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext> testContext)
12+
public KebabCaseTests(OpenApiTestContext<KebabCaseNamingConventionStartup<NamingConventionsDbContext>, NamingConventionsDbContext> testContext)
1313
{
1414
_testContext = testContext;
1515

test/OpenApiTests/OpenApiTestContext.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ internal async Task<JsonElement> GetSwaggerDocumentAsync()
2828

2929
private async Task<JsonElement> CreateSwaggerDocumentAsync()
3030
{
31-
string swaggerDocumentOutputPath = GetSwaggerDocumentAbsoluteOutputPath(SwaggerDocumentOutputPath);
31+
string absoluteOutputPath = GetSwaggerDocumentAbsoluteOutputPath(SwaggerDocumentOutputPath);
3232

3333
string content = await GetAsync("swagger/v1/swagger.json");
3434

35-
JsonElement swaggerDocument = ParseSwaggerDocument(content);
36-
await WriteToDiskAsync(swaggerDocumentOutputPath, swaggerDocument);
35+
JsonElement rootElement = ParseSwaggerDocument(content);
36+
await WriteToDiskAsync(absoluteOutputPath, rootElement);
3737

38-
return swaggerDocument;
38+
return rootElement;
3939
}
4040

4141
private static string GetSwaggerDocumentAbsoluteOutputPath(string? relativePath)
4242
{
4343
AssertHasSwaggerDocumentOutputPath(relativePath);
4444

4545
string solutionRoot = Path.Combine(Assembly.GetExecutingAssembly().Location, "../../../../../../");
46-
string outputPath = Path.Join(solutionRoot, relativePath, "swagger.g.json");
46+
string outputPath = Path.Combine(solutionRoot, relativePath, "swagger.g.json");
4747

4848
return Path.GetFullPath(outputPath);
4949
}

test/OpenApiTests/OpenApiTests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
</None>
1010
</ItemGroup>
1111

12+
<ItemGroup>
13+
<EmbeddedResource Include="LegacyOpenApiIntegration\swagger.json" />
14+
</ItemGroup>
15+
1216
<ItemGroup>
1317
<ProjectReference Include="..\..\src\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
1418
<ProjectReference Include="..\..\src\JsonApiDotNetCore.OpenApi\JsonApiDotNetCore.OpenApi.csproj" />
@@ -19,10 +23,6 @@
1923
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
2024
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetVersion)" />
2125
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
22-
<PackageReference Include="BlushingPenguin.JsonPath" Version="1.0.*" />
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<EmbeddedResource Include="LegacyOpenApiIntegration\swagger.json" />
26+
<PackageReference Include="BlushingPenguin.JsonPath" Version="1.0.3" />
2727
</ItemGroup>
28-
</Project>
28+
</Project>

0 commit comments

Comments
 (0)