diff --git a/src/Uno.Templates/content/unoapp/Directory.Packages.props b/src/Uno.Templates/content/unoapp/Directory.Packages.props
index fe82ce06e..ff9b12758 100644
--- a/src/Uno.Templates/content/unoapp/Directory.Packages.props
+++ b/src/Uno.Templates/content/unoapp/Directory.Packages.props
@@ -23,7 +23,8 @@
-
+
+
diff --git a/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/MyExtensionsApp.1.Server.csproj b/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/MyExtensionsApp.1.Server.csproj
index 6c7414426..11931fbab 100644
--- a/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/MyExtensionsApp.1.Server.csproj
+++ b/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/MyExtensionsApp.1.Server.csproj
@@ -23,7 +23,8 @@
-
+
+
diff --git a/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/Program.cs b/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/Program.cs
index 98ee6d9ec..da7cfc26d 100644
--- a/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/Program.cs
+++ b/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Server/Program.cs
@@ -36,27 +36,24 @@
builder.Services.Configure(options =>
options.LowercaseUrls = true);
- // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
- builder.Services.AddEndpointsApiExplorer();
- builder.Services.AddSwaggerGen(c =>
- {
- // Include XML comments for all included assemblies
- Directory.EnumerateFiles(AppContext.BaseDirectory, "*.xml")
- .Where(x => x.Contains("MyExtensionsApp._1")
- && File.Exists(Path.Combine(
- AppContext.BaseDirectory,
- $"{Path.GetFileNameWithoutExtension(x)}.dll")))
- .ToList()
- .ForEach(path => c.IncludeXmlComments(path));
- });
+ // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
+ builder.Services.AddOpenApi();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
- app.UseSwagger();
- app.UseSwaggerUI();
+ app.MapOpenApi();
+ app.MapScalarApiReference(o =>
+ {
+ o.EnabledClients = [
+ ScalarClient.HttpClient,
+ ScalarClient.Http11,
+ ScalarClient.JQuery,
+ ScalarClient.Xhr
+ ];
+ });
}
app.UseHttpsRedirection();