Anarchy.Toolkit.Runtime.Web
1.0.0
dotnet add package Anarchy.Toolkit.Runtime.Web --version 1.0.0
NuGet\Install-Package Anarchy.Toolkit.Runtime.Web -Version 1.0.0
<PackageReference Include="Anarchy.Toolkit.Runtime.Web" Version="1.0.0" />
<PackageVersion Include="Anarchy.Toolkit.Runtime.Web" Version="1.0.0" />
<PackageReference Include="Anarchy.Toolkit.Runtime.Web" />
paket add Anarchy.Toolkit.Runtime.Web --version 1.0.0
#r "nuget: Anarchy.Toolkit.Runtime.Web, 1.0.0"
#:package Anarchy.Toolkit.Runtime.Web@1.0.0
#addin nuget:?package=Anarchy.Toolkit.Runtime.Web&version=1.0.0
#tool nuget:?package=Anarchy.Toolkit.Runtime.Web&version=1.0.0
Anarchy.Toolkit.Runtime.Web
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Runtime · Package catalog
Shared ASP.NET Core REST API pipeline and presentation helpers.
dotnet add package Anarchy.Toolkit.Runtime.Web
- Build an API using
RestApiWebAppStartupBaseand the web entry-point bases for native or container hosting; AWS Lambda hosting lives inAnarchy.Toolkit.Runtime.Web.Aws. - Compose the supplied middleware, JWT bearer authentication with scope policies (
RequireScope, no IdentityServer dependency), JSON converters and validation attributes around your application's endpoints. - A health controller exposes the shared health-report model. Application-specific scopes and endpoints remain in the consumer.
- Swagger is opt-in: add
Anarchy.Toolkit.Runtime.Web.Swaggerand callAddToolkitSwagger(ApiName, AppSettings, Environment)from the startup. Without it, this package references neither Swashbuckle nor Microsoft.OpenApi.
When to use it
Use this package to host a toolkit-based REST API on ASP.NET Core (natively or in a container; AWS Lambda through Runtime.Web.Aws) while sharing startup, authentication, health and error-handling conventions. It supplies infrastructure around your endpoints; it does not define your application's API contracts or business logic.
How to use it
- Define application settings and a settings module, then derive a startup from
RestApiWebAppStartupBase<TAppSettingsDiModule, TAppSettings>. Register your services and configure authorization scopes in its service-configuration hook. - Implement controllers with explicit request/response types and call application services rather than database repositories directly. Keep transport DTOs separate from domain entities.
- Supply the
IReadOnlyCollection<IHealthCheck>consumed by the health controller, using an empty collection if there are no checks or registering the relevant provider reports. - Use
WebAppEntryPoint.RunWebHost<Startup>(args)for a native host and anAwsWebAppEntryPointBaseimplementation (fromAnarchy.Toolkit.Runtime.Web.Aws) for Lambda. Configure real authentication, secrets and environment-specific settings before deployment.
The sample API startup, native entry point and Lambda entry point show the complete structure. Test the HTTP pipeline with Testing.Runtime.Web (and the Lambda pipeline with Testing.Runtime.Web.Aws).
See the endpoint guide, API sample and toolkit overview.
Third-party dependencies
This package brings these libraries, which its name does not announce:
| Library | Why | In the public API? |
|---|---|---|
Newtonsoft.Json (through Microsoft.AspNetCore.Mvc.NewtonsoftJson) |
Controllers serialize JSON with Newtonsoft; the exception middleware maps its errors | No: configured by the startup |
| Microsoft.IdentityModel.JsonWebTokens and System.IdentityModel.Tokens.Jwt | Validate JWT bearer tokens and read their scopes | No |
Releases
See the release notes for the complete release history.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Anarchy.Toolkit.Core.Health (>= 3.0.0)
- Anarchy.Toolkit.Core.Persistence.Abstractions (>= 3.0.0)
- Anarchy.Toolkit.Core.Telemetry (>= 2.0.0)
- Anarchy.Toolkit.Infrastructure.Http (>= 3.0.0)
- Anarchy.Toolkit.Runtime (>= 1.0.0)
- Humanizer (>= 3.0.10)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.15)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 10.0.15)
- Microsoft.Extensions.Hosting.Systemd (>= 10.0.15)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.23.0)
- Newtonsoft.Json (>= 13.0.4)
- System.IdentityModel.Tokens.Jwt (>= 8.23.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Anarchy.Toolkit.Runtime.Web:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Runtime.Web.Aws
Opt-in AWS Lambda hosting for toolkit REST APIs: AwsWebAppEntryPointBase behind API Gateway, the X-Amzn-Trace-Id middleware (UseAmazonTraceId) and Lambda path helpers. |
|
|
Anarchy.Toolkit.Runtime.Web.Ui
Blazor UI pipeline: cookie-session OAuth login, environment catalog, downstream API client base, and reusable components (notifications, modals, JSON viewer, pagination). |
|
|
Anarchy.Toolkit.Testing.Runtime.Web
Web end-to-end test base (RestApiTestCaseBase exercising the native Kestrel pipeline) and HTTP request helpers; the AWS Lambda pipeline is tested with Anarchy.Toolkit.Testing.Runtime.Web.Aws. |
|
|
Anarchy.Toolkit.Runtime.Web.Swagger
Opt-in Swagger/OpenAPI for toolkit REST APIs: the OpenAPI document (OAuth2 scheme, authorization and Accept-Encoding filters, runtime description) and the themed Swagger UI (AddToolkitSwagger). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 71 | 11/27/2026 |
## Releases
### 1.0.0
- Renamed from `Anarchy.Toolkit.Web`, whose last release was 2.1.0; the releases below were published under that name.
- **Breaking:** extension classes take the `Extensions` suffix under `Extensions/<extended namespace>/`, helpers live in `Helpers/<Subject>/`, and their namespaces follow those folders: update `using` directives.
- Lambda hosting moves to the opt-in `Anarchy.Toolkit.Runtime.Web.Aws` (with `UseAmazonTraceId()`), and Swagger to `Anarchy.Toolkit.Runtime.Web.Swagger` (`AddToolkitSwagger`).
- REST APIs no longer require `IAuthServiceAppSettings`: authentication and the OAuth2 scheme turn on when the settings implement it, and scopes are checked by the toolkit's own `RequireScope` (accepting `scope` and `scp` claims) instead of IdentityServer4.
### 2.1.0
- Update the persistence-abstractions dependency.
### 2.0.1
- fix(Web): Support Windows paths and host architecture
- chore(build): Format package release notes property
### 2.0.0
- feat(automation): establish onboarding and layering conventions
- feat(telemetry)!: introduce provider-neutral application telemetry
- refactor(packages)!: restructure persistence and automation packages
- refactor(infrastructure.correlationid)!: decouple correlation scopes from Serilog
- refactor(core)!: reshape telemetry, event and health contracts
- fix(persistence)!: preserve unit-of-work transaction ownership
- refactor(telemetry)!: remove legacy APIs and simplify namespaces
- feat(automation)!: configure layering and bridge build telemetry
- refactor(telemetry)!: update consumers and samples
- docs(onboarding): align package guidance, skills, and architecture
### 1.2.1
- docs(packages): identify each package's pillar and layer
- build(packages): attribute the copyright to Leandro Melão Medeiros
- build: relicense under Apache-2.0 and update the package metadata
### 1.2.0
- build(deps): upgrade Swashbuckle.AspNetCore to 11.0.1 and Microsoft.OpenApi to 3.11.1
- feat(Web): serve OpenAPI 3.2 and theme Swagger UI with a light and dark Anarchy theme
### 1.0.8
- docs: expand XML docblocks across all projects for the DocFX API reference
### 1.0.7
- `Microsoft.OpenApi` updated to 2.13.0 and `System.Security.Cryptography.*` aligned with the .NET 10 LTS (10.0.15, down from 11.0.0).
### 1.0.6
- refactor(src): clean up code style across library packages
- chore(deps): update AWS SDK, Lambda ASP.NET Core server and MySqlConnector packages
### 1.0.5
- chore(deps): update AWS SDK packages
### 1.0.3
- build: migrate local automation to build tooling
### 1.0.2
- docs: expand package guides and release histories
- chore(deps): update AWS, Polly, and xUnit packages
### 1.0.1
- Added a package-specific NuGet README.
### 1.0.0
- Introduced API hosting, controller and middleware infrastructure, authentication, Swagger and Lambda hosting helpers.