Add minimal API support to LittleBlocks framework #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive support for .NET minimal APIs to the LittleBlocks framework, providing the same rich feature set that was previously only available for traditional MVC/Controller-based applications.
What's Changed
New Extension Methods
WebApplicationBuilder.BootstrapLittleBlocks()- Configures LittleBlocks services for minimal APIsWebApplication.UseLittleBlocksPipeline()- Sets up the complete middleware pipeline with all LittleBlocks featuresNew Components
MinimalApiBootstrapper- Handles service registration without requiring a Startup classWebApplicationExtensions- Pipeline configuration optimized for minimal APIsMinimalApiPipelineOptions- Configuration options for customizing the pipelineFeatures Supported
All existing LittleBlocks features work seamlessly with minimal APIs:
Usage Examples
Traditional Startup Pattern (Existing)
New Minimal API Pattern
Sample Application
A complete working sample (
LittleBlocks.Sample.MinimalApi) demonstrates:Screenshots
Start Page with Navigation

Swagger UI Integration

Backward Compatibility
Technical Implementation
IUrlHelper)AddEndpointsApiExplorer()andAddSwaggerGen()for minimal API documentationThis enables teams to modernize their APIs to use minimal APIs while keeping all the enterprise-grade features that LittleBlocks provides.
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:
http://crl3.digicert.com:443/DigiCertHighAssuranceEVRootCA.crldotnet build LittleBlocks.sln(http block)http://crl3.digicert.com:443/NETFoundationProjectsCodeSigningCA.crldotnet build LittleBlocks.sln(http block)httpbin.org/usr/lib/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 38079 --endpoint 127.0.0.1:038079 --role client --parentprocessid 4254 --telemetryoptedin false(dns block)httpbintest.org/usr/lib/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 38079 --endpoint 127.0.0.1:038079 --role client --parentprocessid 4254 --telemetryoptedin false(dns block)www.google.com/home/REDACTED/work/LittleBlocks.API/LittleBlocks.API/src/Samples/LittleBlocks.Sample.MinimalApi/bin/Debug/net8.0/LittleBlocks.Sample.MinimalApi(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.