diff --git a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Documentation/SwaggerDocumentationExtensions.cs b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Documentation/ApiDocumentationExtensions.cs similarity index 86% rename from Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Documentation/SwaggerDocumentationExtensions.cs rename to Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Documentation/ApiDocumentationExtensions.cs index 1e87e2e6..2c366652 100644 --- a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Documentation/SwaggerDocumentationExtensions.cs +++ b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Documentation/ApiDocumentationExtensions.cs @@ -7,7 +7,7 @@ public static class ApiDocumentationExtensions { public static void UseApiDocumentation(this IEndpointRouteBuilder app) => - app.MapGet("/", () => Results.Redirect("/swagger")) + app.MapGet("/", () => Results.Redirect("/docs/v1")) .Produces(StatusCodes.Status200OK) .WithTags("Documentation"); } diff --git a/Chapter-2-modules-separation/Src/Directory.Packages.props b/Chapter-2-modules-separation/Src/Directory.Packages.props index 5e714d87..6dba2749 100644 --- a/Chapter-2-modules-separation/Src/Directory.Packages.props +++ b/Chapter-2-modules-separation/Src/Directory.Packages.props @@ -22,7 +22,7 @@ - + diff --git a/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj b/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj index ab027773..232c0a6c 100644 --- a/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj +++ b/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj @@ -6,7 +6,7 @@ - + diff --git a/Chapter-2-modules-separation/Src/Fitnet/Program.cs b/Chapter-2-modules-separation/Src/Fitnet/Program.cs index 005a3e2f..5ecd8490 100644 --- a/Chapter-2-modules-separation/Src/Fitnet/Program.cs +++ b/Chapter-2-modules-separation/Src/Fitnet/Program.cs @@ -2,11 +2,11 @@ using EvolutionaryArchitecture.Fitnet.Common.Api.ErrorHandling; using EvolutionaryArchitecture.Fitnet.Common.Infrastructure; using EvolutionaryArchitecture.Fitnet.Modules; +using Scalar.AspNetCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +builder.Services.AddOpenApi(); builder.Services.AddExceptionHandling(); builder.Services.AddCommonInfrastructure(); @@ -16,8 +16,8 @@ if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); + app.MapScalarApiReference("/docs/v1"); } app.UseApiDocumentation(); diff --git a/Chapter-2-modules-separation/Src/Fitnet/Properties/launchSettings.json b/Chapter-2-modules-separation/Src/Fitnet/Properties/launchSettings.json index 90e43af9..f1270da7 100644 --- a/Chapter-2-modules-separation/Src/Fitnet/Properties/launchSettings.json +++ b/Chapter-2-modules-separation/Src/Fitnet/Properties/launchSettings.json @@ -1,19 +1,11 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:62425", - "sslPort": 44354 - } - }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "http://localhost:5013", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" @@ -23,19 +15,11 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "https://localhost:7097;http://localhost:5013", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props index 66c427d0..fedfb1f1 100644 --- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props +++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props @@ -20,7 +20,7 @@ - + diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj index 9e9d68a9..f1604d82 100644 --- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj +++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj @@ -7,7 +7,7 @@ - + diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs index 53578f1b..c5f99a49 100644 --- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs +++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs @@ -1,12 +1,12 @@ using EvolutionaryArchitecture.Fitnet.Common.Api.ErrorHandling; using EvolutionaryArchitecture.Fitnet.Common.Infrastructure.Clock; using EvolutionaryArchitecture.Fitnet.Contracts.Api; +using Scalar.AspNetCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +builder.Services.AddOpenApi(); builder.Services.AddContractsApi(builder.Configuration); @@ -16,8 +16,8 @@ if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); + app.MapScalarApiReference("/docs/v1"); } app.UseHttpsRedirection(); diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json index d184a5fc..2443ed32 100644 --- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json +++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json @@ -1,19 +1,11 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:62425", - "sslPort": 44354 - } - }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "http://localhost:5010", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" @@ -23,19 +15,11 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "https://localhost:7097;http://localhost:5010", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": false, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props b/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props index 998d1534..3009c315 100644 --- a/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props +++ b/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props @@ -28,7 +28,7 @@ - + diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj index f4958bce..7f76b79e 100644 --- a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj +++ b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs index fd3c399e..0f33d9bd 100644 --- a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs +++ b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs @@ -4,12 +4,12 @@ using EvolutionaryArchitecture.Fitnet.Offers.Api; using EvolutionaryArchitecture.Fitnet.Passes.Api; using EvolutionaryArchitecture.Fitnet.Reports; +using Scalar.AspNetCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +builder.Services.AddOpenApi(); builder.Services.AddClock(); @@ -22,8 +22,8 @@ // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); + app.MapScalarApiReference("/docs/v1"); } app.UseHttpsRedirection(); diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Properties/launchSettings.json b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Properties/launchSettings.json index 6699a79c..96bbd8e4 100644 --- a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Properties/launchSettings.json +++ b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Properties/launchSettings.json @@ -1,19 +1,11 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:62425", - "sslPort": 44354 - } - }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "http://localhost:5013", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" @@ -23,19 +15,11 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "https://localhost:7097;http://localhost:5013", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Directory.Packages.props b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Directory.Packages.props index 7ac1efbd..00182137 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Directory.Packages.props +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Directory.Packages.props @@ -20,7 +20,7 @@ - + diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj index 570da883..03a007b8 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj @@ -7,7 +7,7 @@ - + diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs index 55dbd503..0eb7c84c 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs @@ -1,12 +1,12 @@ using EvolutionaryArchitecture.Fitnet.Common.Api.ErrorHandling; using EvolutionaryArchitecture.Fitnet.Common.Infrastructure.Clock; using EvolutionaryArchitecture.Fitnet.Contracts.Api; +using Scalar.AspNetCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +builder.Services.AddOpenApi(); builder.Services.AddSingleton(TimeProvider.System); builder.Services.AddClock(); @@ -16,8 +16,8 @@ if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); + app.MapScalarApiReference("/docs/v1"); } app.UseHttpsRedirection(); diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json index d184a5fc..2443ed32 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts/Properties/launchSettings.json @@ -1,19 +1,11 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:62425", - "sslPort": 44354 - } - }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "http://localhost:5010", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" @@ -23,19 +15,11 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "https://localhost:7097;http://localhost:5010", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": false, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Directory.Packages.props b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Directory.Packages.props index 3da1e64d..e342762f 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Directory.Packages.props +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Directory.Packages.props @@ -28,7 +28,7 @@ - + diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Fitnet.csproj b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Fitnet.csproj index efd12564..73bd00d1 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Fitnet.csproj +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Fitnet.csproj @@ -6,7 +6,7 @@ - + diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Program.cs b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Program.cs index fd3c399e..0f33d9bd 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Program.cs +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Program.cs @@ -4,12 +4,12 @@ using EvolutionaryArchitecture.Fitnet.Offers.Api; using EvolutionaryArchitecture.Fitnet.Passes.Api; using EvolutionaryArchitecture.Fitnet.Reports; +using Scalar.AspNetCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +builder.Services.AddOpenApi(); builder.Services.AddClock(); @@ -22,8 +22,8 @@ // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); + app.MapScalarApiReference("/docs/v1"); } app.UseHttpsRedirection(); diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Properties/launchSettings.json b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Properties/launchSettings.json index 6699a79c..96bbd8e4 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Properties/launchSettings.json +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/Fitnet/Properties/launchSettings.json @@ -1,19 +1,11 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:62425", - "sslPort": 44354 - } - }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "http://localhost:5013", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" @@ -23,19 +15,11 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "launchUrl": "swagger", + "launchUrl": "docs/v1", "applicationUrl": "https://localhost:7097;http://localhost:5013", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file