diff --git a/AStar.Web.slnx b/AStar.Web.slnx
index 56164e8..51ee56d 100644
--- a/AStar.Web.slnx
+++ b/AStar.Web.slnx
@@ -1,34 +1,34 @@
-
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..ee33b71
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,22 @@
+
+
+ true
+ net10.0
+ enable
+ true
+
+ $(InterceptorsNamespaces);Microsoft.AspNetCore.OpenApi.Generated
+
+ $(Features);InterceptorsPreview
+
+
+
+ True
+ 1701;1702;
+
+
+
+ True
+ 1701;1702;
+
+
diff --git a/src/aspire/AStar.Web.AppHost/AStar.Web.AppHost.csproj b/src/aspire/AStar.Web.AppHost/AStar.Web.AppHost.csproj
index 9c9d7af..cea54b8 100644
--- a/src/aspire/AStar.Web.AppHost/AStar.Web.AppHost.csproj
+++ b/src/aspire/AStar.Web.AppHost/AStar.Web.AppHost.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/src/aspire/AStar.Web.AppHost/AppHost.cs b/src/aspire/AStar.Web.AppHost/AppHost.cs
index ece3ffb..75adab0 100644
--- a/src/aspire/AStar.Web.AppHost/AppHost.cs
+++ b/src/aspire/AStar.Web.AppHost/AppHost.cs
@@ -11,4 +11,4 @@
.WithReference(apiService)
.WaitFor(apiService);
-builder.Build().Run();
\ No newline at end of file
+builder.Build().Run();
diff --git a/src/aspire/AStar.Web.ServiceDefaults/AStar.Web.ServiceDefaults.csproj b/src/aspire/AStar.Web.ServiceDefaults/AStar.Web.ServiceDefaults.csproj
index ca7fc07..d53150d 100644
--- a/src/aspire/AStar.Web.ServiceDefaults/AStar.Web.ServiceDefaults.csproj
+++ b/src/aspire/AStar.Web.ServiceDefaults/AStar.Web.ServiceDefaults.csproj
@@ -12,11 +12,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/src/aspire/AStar.Web.ServiceDefaults/Extensions.cs b/src/aspire/AStar.Web.ServiceDefaults/Extensions.cs
index c2e04a3..6974bc2 100644
--- a/src/aspire/AStar.Web.ServiceDefaults/Extensions.cs
+++ b/src/aspire/AStar.Web.ServiceDefaults/Extensions.cs
@@ -62,11 +62,10 @@ public static TBuilder ConfigureOpenTelemetry(this TBuilder builder)
.WithTracing(tracing =>
{
tracing.AddSource(builder.Environment.ApplicationName)
- .AddAspNetCoreInstrumentation(tracing =>
+ .AddAspNetCoreInstrumentation(instrumentationOptions =>
// Exclude health check requests from tracing
- tracing.Filter = context =>
- !context.Request.Path.StartsWithSegments(HealthEndpointPath)
- && !context.Request.Path.StartsWithSegments(AlivenessEndpointPath)
+ instrumentationOptions.Filter = context => !context.Request.Path.StartsWithSegments(HealthEndpointPath)
+ && !context.Request.Path.StartsWithSegments(AlivenessEndpointPath)
)
// Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package)
//.AddGrpcClientInstrumentation()
@@ -109,18 +108,17 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
{
// Adding health checks endpoints to applications in non-development environments has security implications.
// See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments.
- if (app.Environment.IsDevelopment())
- {
- // All health checks must pass for app to be considered ready to accept traffic after starting
- app.MapHealthChecks(HealthEndpointPath);
+ if (!app.Environment.IsDevelopment()) return app;
+
+ // All health checks must pass for app to be considered ready to accept traffic after starting
+ app.MapHealthChecks(HealthEndpointPath);
- // Only health checks tagged with the "live" tag must pass for app to be considered alive
- app.MapHealthChecks(AlivenessEndpointPath, new HealthCheckOptions
- {
- Predicate = r => r.Tags.Contains("live")
- });
- }
+ // Only health checks tagged with the "live" tag must pass for app to be considered alive
+ app.MapHealthChecks(AlivenessEndpointPath, new HealthCheckOptions
+ {
+ Predicate = r => r.Tags.Contains("live")
+ });
return app;
}
-}
\ No newline at end of file
+}
diff --git a/src/modules/apis/AStar.Web.ApiService/AStar.Web.ApiService.csproj b/src/modules/apis/AStar.Web.ApiService/AStar.Web.ApiService.csproj
index 98b9f47..d6134eb 100644
--- a/src/modules/apis/AStar.Web.ApiService/AStar.Web.ApiService.csproj
+++ b/src/modules/apis/AStar.Web.ApiService/AStar.Web.ApiService.csproj
@@ -7,7 +7,12 @@
+
+
+
+
+
diff --git a/src/modules/apis/AStar.Web.ApiService/Program.cs b/src/modules/apis/AStar.Web.ApiService/Program.cs
index f0c1c43..d5c4b6e 100644
--- a/src/modules/apis/AStar.Web.ApiService/Program.cs
+++ b/src/modules/apis/AStar.Web.ApiService/Program.cs
@@ -1,8 +1,21 @@
+using Asp.Versioning;
+
var builder = WebApplication.CreateBuilder(args);
// Add service defaults & Aspire client integrations.
builder.AddServiceDefaults();
+_ = builder.Services.AddApiVersioning(options =>
+ {
+ options.DefaultApiVersion = new ApiVersion(1, 0);
+ options.AssumeDefaultVersionWhenUnspecified = true;
+ options.ReportApiVersions = true;
+ })
+ .AddApiExplorer(options =>
+ {
+ options.GroupNameFormat = "'v'VVV";
+ options.SubstituteApiVersionInUrl = true;
+ });
// Add services to the container.
builder.Services.AddProblemDetails();
@@ -23,13 +36,12 @@
app.MapGet("/weatherforecast", () =>
{
- var forecast = Enumerable.Range(1, 5).Select(index =>
- new WeatherForecast
- (
- DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
- Random.Shared.Next(-20, 55),
- summaries[Random.Shared.Next(summaries.Length)]
- ))
+ var forecast = Enumerable.Range(1, 5).Select(index => new WeatherForecast
+ (
+ DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
+ Random.Shared.Next(-20, 55),
+ summaries[Random.Shared.Next(summaries.Length)]
+ ))
.ToArray();
return forecast;
})
@@ -42,4 +54,4 @@
internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
-}
\ No newline at end of file
+}
diff --git a/src/uis/AStar.Dev.Web/AStar.Dev.Web.csproj b/src/uis/AStar.Dev.Web/AStar.Dev.Web.csproj
index da9a099..947fc79 100644
--- a/src/uis/AStar.Dev.Web/AStar.Dev.Web.csproj
+++ b/src/uis/AStar.Dev.Web/AStar.Dev.Web.csproj
@@ -1,13 +1,42 @@
- net10.0
- enable
- enable
+ true
+ true
+ d7e61e34-084f-4c2b-9be8-5925170dc3b7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/uis/AStar.Dev.Web/Components/App.razor b/src/uis/AStar.Dev.Web/Components/App.razor
index af64487..9baa660 100644
--- a/src/uis/AStar.Dev.Web/Components/App.razor
+++ b/src/uis/AStar.Dev.Web/Components/App.razor
@@ -1,21 +1,54 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
\ No newline at end of file
+