diff --git a/src/Vegasco.Server.Api/Common/StartupExtensions.cs b/src/Vegasco.Server.Api/Common/StartupExtensions.cs index ada640e..ac96a37 100644 --- a/src/Vegasco.Server.Api/Common/StartupExtensions.cs +++ b/src/Vegasco.Server.Api/Common/StartupExtensions.cs @@ -1,4 +1,5 @@ using Asp.Versioning.ApiExplorer; +using Scalar.AspNetCore; using Vegasco.Server.Api.Endpoints; using Vegasco.Server.ServiceDefaults; @@ -36,18 +37,8 @@ internal static class StartupExtensions if (app.Environment.IsDevelopment()) { - app.MapOpenApi("/swagger/{documentName}/swagger.json"); - app.UseSwaggerUI(o => - { - // Create a Swagger endpoint for each API version - IReadOnlyList apiVersions = app.DescribeApiVersions(); - foreach (ApiVersionDescription apiVersionDescription in apiVersions) - { - string url = $"/swagger/{apiVersionDescription.GroupName}/swagger.json"; - string name = apiVersionDescription.GroupName.ToUpperInvariant(); - o.SwaggerEndpoint(url, name); - } - }); + app.MapOpenApi(); + app.MapScalarApiReference(); } return app; diff --git a/src/Vegasco.Server.Api/Properties/launchSettings.json b/src/Vegasco.Server.Api/Properties/launchSettings.json index 0dec4f4..474c37d 100644 --- a/src/Vegasco.Server.Api/Properties/launchSettings.json +++ b/src/Vegasco.Server.Api/Properties/launchSettings.json @@ -3,7 +3,7 @@ "https": { "commandName": "Project", "launchBrowser": true, - "launchUrl": "swagger", + "launchUrl": "scalar/v1", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, diff --git a/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj b/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj index 6b8436f..86548ed 100644 --- a/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj +++ b/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj @@ -29,9 +29,9 @@ + -