New Angular based web version #1

Closed
thomas.nuyken wants to merge 150 commits from main into ddd
2 changed files with 14 additions and 1 deletions
Showing only changes of commit a1174e3b42 - Show all commits

View File

@@ -1,4 +1,5 @@
using Vegasco.Server.Api.Endpoints; using Asp.Versioning.ApiExplorer;
using Vegasco.Server.Api.Endpoints;
using Vegasco.Server.ServiceDefaults; using Vegasco.Server.ServiceDefaults;
namespace Vegasco.Server.Api.Common; namespace Vegasco.Server.Api.Common;
@@ -36,6 +37,17 @@ internal static class StartupExtensions
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment())
{ {
app.MapOpenApi("/swagger/{documentName}/swagger.json"); app.MapOpenApi("/swagger/{documentName}/swagger.json");
app.UseSwaggerUI(o =>
{
// Create a Swagger endpoint for each API version
IReadOnlyList<ApiVersionDescription> apiVersions = app.DescribeApiVersions();
foreach (ApiVersionDescription apiVersionDescription in apiVersions)
{
string url = $"/swagger/{apiVersionDescription.GroupName}/swagger.json";
string name = apiVersionDescription.GroupName.ToUpperInvariant();
o.SwaggerEndpoint(url, name);
}
});
} }
return app; return app;

View File

@@ -31,6 +31,7 @@
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" /> <PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
<PackageReference Include="StronglyTypedId" Version="1.0.0-beta08" PrivateAssets="all" ExcludeAssets="runtime" /> <PackageReference Include="StronglyTypedId" Version="1.0.0-beta08" PrivateAssets="all" ExcludeAssets="runtime" />
<PackageReference Include="StronglyTypedId.Templates" Version="1.0.0-beta08" /> <PackageReference Include="StronglyTypedId.Templates" Version="1.0.0-beta08" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>