Skip to content

Commit d265c37

Browse files
authored
feat(templates): improve bit Boilerplate scalar integration #11582 (#11583)
1 parent b83a111 commit d265c37

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

src/Templates/Boilerplate/Bit.Boilerplate/.docs/09- Dependency Injection & Service Registration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Each layer adds services specific to its scope, ensuring proper service availabi
9797
### Registration Flow Example (Server API):
9898

9999
1. **`Program.cs`** calls `AddServerApiProjectServices()`
100-
2. **`AddServerApiProjectServices()`** internally calls helper methods like `AddIdentity()`, `AddSwaggerGen()`
100+
2. **`AddServerApiProjectServices()`** internally calls helper methods like `AddIdentity()`
101101
3. Each helper method registers related services (e.g., Identity services, JWT authentication, external auth providers)
102102

103103
## Service Availability Matrix

src/Templates/Boilerplate/Bit.Boilerplate/.docs/12- Blazor Modes, PreRendering & PWA.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -350,16 +350,7 @@ self.serverHandledUrls = [
350350
/\/odata\//,
351351
/\/core\//,
352352
/\/hangfire/,
353-
/\/healthchecks-ui/,
354-
/\/healthz/,
355-
/\/health/,
356-
/\/alive/,
357-
/\/swagger/,
358-
/\/signin-/,
359-
/\/.well-known/,
360-
/\/sitemap.xml/,
361-
/\/sitemap_index.xml/,
362-
/\/web-interop-app.html/
353+
...
363354
];
364355
```
365356

src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Program.Middlewares.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ private static void ConfigureMiddlewares(this WebApplication app)
5555

5656
app.MapAppHealthChecks();
5757

58-
app.MapOpenApi();
59-
app.MapScalarApiReference();
58+
app.MapOpenApi().CacheOutput("AppResponseCachePolicy");
59+
app.MapScalarApiReference().CacheOutput("AppResponseCachePolicy");
6060
app.MapGet("/", () => Results.Redirect("/scalar")).ExcludeFromDescription();
6161
app.MapGet("/swagger", () => Results.Redirect("/scalar")).ExcludeFromDescription();
6262

@@ -70,7 +70,7 @@ private static void ConfigureMiddlewares(this WebApplication app)
7070
{
7171
RouteParameter = routeParameter,
7272
QueryStringParameter = queryStringParameter
73-
}).WithTags("Test").CacheOutput("AppResponseCachePolicy");
73+
}).WithTags("Test").CacheOutput("AppResponseCachePolicy").ExcludeFromDescription();
7474

7575
//#if (signalR == true)
7676
app.MapHub<SignalR.AppHub>("/app-hub", options => options.AllowStatefulReconnects = true);

src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.Middlewares.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public static void ConfigureMiddlewares(this WebApplication app)
114114
app.MapAppHealthChecks();
115115

116116
//#if (api == "Integrated")
117-
app.MapOpenApi();
118-
app.MapScalarApiReference();
117+
app.MapOpenApi().CacheOutput("AppResponseCachePolicy");
118+
app.MapScalarApiReference().CacheOutput("AppResponseCachePolicy");
119119
app.MapGet("/swagger", () => Results.Redirect("/scalar")).ExcludeFromDescription();
120120

121121
app.UseHangfireDashboard(options: new()
@@ -128,7 +128,7 @@ public static void ConfigureMiddlewares(this WebApplication app)
128128
{
129129
RouteParameter = routeParameter,
130130
QueryStringParameter = queryStringParameter
131-
}).WithTags("Test").CacheOutput("AppResponseCachePolicy");
131+
}).WithTags("Test").CacheOutput("AppResponseCachePolicy").ExcludeFromDescription();
132132

133133
//#if (signalR == true)
134134
if (string.IsNullOrEmpty(configuration["Azure:SignalR:ConnectionString"]) is false

0 commit comments

Comments
 (0)