Skip to content

Add flag-driven minimal API bootstrapper alongside configurable pipeline#13

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/generalize-bootstrap-extensions
Draft

Add flag-driven minimal API bootstrapper alongside configurable pipeline#13
Copilot wants to merge 2 commits intomasterfrom
copilot/generalize-bootstrap-extensions

Conversation

Copy link

Copilot AI commented Feb 25, 2026

Created a configurable minimal-API bootstrap equivalent to the existing ASP.NET Core bootstrap, replacing the method-chain pattern with flag-driven options for easier reuse and simplification.

  • Minimal API bootstrap options: Introduced MinimalApiBootstrapOptions with ApiBootstrapperFeatures flags (correlation, health, auth, OpenAPI, start page, etc.), configurable error detail level, optional sections, and hooks for services/endpoints.
  • Service and pipeline wiring: Added BootstrapMinimalApi/UseMinimalApiBootstrap to register minimal services and compose middleware/endpoints based on feature flags; generalized MVC pipeline to honor the same flags.
  • Tests: Added unit tests validating default minimal bootstrap wiring, feature gating (e.g., disabling correlation), and binding additional configuration sections.
var builder = WebApplication.CreateBuilder(args);

var options = builder.BootstrapMinimalApi(o =>
{
    o.Features &= ~ApiBootstrapperFeatures.RequestCorrelation;
    o.AddSection<CustomOptions>("CustomOptions");
});

var app = builder.Build();
app.UseMinimalApiBootstrap(options);
app.MapGet("/ping", () => "pong");

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • httpbin.org
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/bin/Debug/net8.0/LittleBlocks.Sample.WebAPI.IntegrationTests.runtimeconfig.json --depsfile /home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/bin/Debug/net8.0/LittleBlocks.Sample.WebAPI.IntegrationTests.deps.json /home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/bin/Debug/net8.0/testhost.dll --port 35035 --endpoint 127.0.0.1:035035 --role client --parentprocessid 4536 --telemetryoptedin false (dns block)
  • httpbintest.org
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/bin/Debug/net8.0/LittleBlocks.Sample.WebAPI.IntegrationTests.runtimeconfig.json --depsfile /home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/bin/Debug/net8.0/LittleBlocks.Sample.WebAPI.IntegrationTests.deps.json /home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/bin/Debug/net8.0/testhost.dll --port 35035 --endpoint 127.0.0.1:035035 --role client --parentprocessid 4536 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: moattarwork <1560935+moattarwork@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert LittleBlocks.AspNetCore.Bootstrap for minimal API Add flag-driven minimal API bootstrapper alongside configurable pipeline Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants