Skip to content

Commit ca95cc4

Browse files
authored
Merge pull request #16 from PandaTechAM/development
swagger enhancment
2 parents e6fd4c7 + c806f86 commit ca95cc4

File tree

7 files changed

+10
-19
lines changed

7 files changed

+10
-19
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Add the following configuration to your `appsettings.json` file:
253253
Based on the above configuration, the UI will be accessible at the following URLs:
254254

255255
- **Swagger (all documents):** [http://localhost/swagger](http://localhost/swagger)
256-
- **Swagger (external document only):** [http://localhost/doc/integration-v1](http://localhost/doc/integration-v1)
256+
- **Swagger (external document only):** [http://localhost/swagger/integration-v1](http://localhost/swagger/integration-v1)
257257
- **Scalar (admin document):** [http://localhost/scalar/admin-v1](http://localhost/scalar/admin-v1)
258258
- **Scalar (integration document):** [http://localhost/scalar/integration-v1](http://localhost/scalar/integration-v1)
259259

Shared.Kernel.Demo/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
using DistributedCache.Options;
21
using FluentMinimalApiMapper;
32
using Microsoft.AspNetCore.Mvc;
43
using SharedKernel.Demo2;
54
using ResponseCrafter.Enums;
65
using ResponseCrafter.Extensions;
7-
using ResponseCrafter.HttpExceptions;
86
using SharedKernel.Extensions;
97
using SharedKernel.Helpers;
108
using SharedKernel.Logging;
@@ -27,8 +25,8 @@
2725
.AddControllers(AssemblyRegistry.ToArray())
2826
.AddMediatrWithBehaviors(AssemblyRegistry.ToArray())
2927
.AddResilienceDefaultPipeline()
30-
.AddRedis(KeyPrefix.AssemblyNamePrefix)
31-
.AddDistributedSignalR("DistributedSignalR") // or .AddSignalR()
28+
// .AddRedis(KeyPrefix.AssemblyNamePrefix)
29+
//.AddDistributedSignalR("DistributedSignalR") // or .AddSignalR()
3230
.MapDefaultTimeZone()
3331
.AddCors()
3432
.AddHealthChecks();

src/SharedKernel/Extensions/ControllerExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
using System.Reflection;
2-
using System.Text.RegularExpressions;
32
using Humanizer;
43
using Microsoft.AspNetCore.Builder;
54
using Microsoft.AspNetCore.Mvc.ApplicationModels;
65
using Microsoft.Extensions.DependencyInjection;
7-
using Microsoft.OpenApi.Models;
86

97
namespace SharedKernel.Extensions;
108

src/SharedKernel/Extensions/OpenTelemetryExtension.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Microsoft.Extensions.DependencyInjection;
44
using Microsoft.Extensions.Diagnostics.HealthChecks;
55
using Microsoft.Extensions.Logging;
6-
using OpenTelemetry;
76
using OpenTelemetry.Logs;
87
using OpenTelemetry.Metrics;
98
using OpenTelemetry.Resources;

src/SharedKernel/OpenApi/OpenApiExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Microsoft.Extensions.DependencyInjection;
66
using Microsoft.Extensions.Hosting;
77
using RegexBox;
8-
using Scalar.AspNetCore;
98
using SharedKernel.OpenApi.Options;
109

1110
namespace SharedKernel.OpenApi;

src/SharedKernel/OpenApi/UiExtensions.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
using System.Reflection;
21
using Microsoft.AspNetCore.Builder;
3-
using Microsoft.Extensions.Configuration;
42
using Scalar.AspNetCore;
5-
using SharedKernel.Extensions;
63
using SharedKernel.OpenApi.Options;
74
using Swashbuckle.AspNetCore.SwaggerUI;
85

@@ -29,7 +26,7 @@ internal static WebApplication MapSwaggerUi(this WebApplication app, OpenApiConf
2926
app.UseSwaggerUI(options =>
3027
{
3128
options.SwaggerEndpoint($"{document.GetEndpointUrl()}", document.Title);
32-
options.RoutePrefix = $"doc/{document.GroupName}";
29+
options.RoutePrefix = $"swagger/{document.GroupName}";
3330
options.AddPandaOptions();
3431
});
3532
}

src/SharedKernel/SharedKernel.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<PackageReadmeFile>Readme.md</PackageReadmeFile>
99
<Authors>Pandatech</Authors>
1010
<Copyright>MIT</Copyright>
11-
<Version>1.0.15</Version>
11+
<Version>1.0.16</Version>
1212
<PackageId>Pandatech.SharedKernel</PackageId>
1313
<Title>Pandatech Shared Kernel Library</Title>
1414
<PackageTags>Pandatech, shared kernel, library, OpenAPI, Swagger, utilities, scalar</PackageTags>
1515
<Description>Pandatech.SharedKernel provides centralized configurations, utilities, and extensions for ASP.NET Core projects. For more information refere to readme.md document.</Description>
1616
<RepositoryUrl>https://github.com/PandaTechAM/be-lib-sharedkernel</RepositoryUrl>
17-
<PackageReleaseNotes>OpenTelemetry bug fix</PackageReleaseNotes>
17+
<PackageReleaseNotes>Swagger enhancment</PackageReleaseNotes>
1818
</PropertyGroup>
1919

2020
<ItemGroup>
@@ -42,18 +42,18 @@
4242
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.10.0" />
4343
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.8.0-rc.1"/>
4444
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0" />
45-
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0"/>
45+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.10.0" />
4646
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.12" />
4747
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.10.0" />
48-
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0"/>
48+
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.10.0" />
4949
<PackageReference Include="Pandatech.Crypto" Version="4.1.1" />
5050
<PackageReference Include="Pandatech.DistributedCache" Version="3.0.1" />
5151
<PackageReference Include="Pandatech.FluentMinimalApiMapper" Version="2.0.1" />
5252
<PackageReference Include="Pandatech.PandaVaultClient" Version="4.0.3" />
5353
<PackageReference Include="Pandatech.RegexBox" Version="3.0.0" />
5454
<PackageReference Include="Pandatech.ResponseCrafter" Version="5.0.3" />
55-
<PackageReference Include="Scalar.AspNetCore" Version="1.2.48" />
56-
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
55+
<PackageReference Include="Scalar.AspNetCore" Version="1.2.49" />
56+
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
5757
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.1.0" />
5858
</ItemGroup>
5959

0 commit comments

Comments
 (0)