The Tools group bundles cross-cutting utilities that don’t belong to any one architectural concern — API documentation, versioning, rate limiting, and the reflection-based dependency discovery engine. Each is a single-purpose module, opt-in via a one-line registration.
appsettings.json — no code changes for an environment swap.| Module | Purpose | Status |
|---|---|---|
| Swagger | OpenAPI/Swagger UI with JWT security definition and versioning awareness. | Production |
| Versioning | URL-segment API versioning (/v1/...) with version reporting. |
Production |
| Rate Limiter | Fixed-window rate limiter with per-policy permits and queues. | Production |
| Refactoring | Reflection-based auto-discovery of IService / IRepository / IUnitOfWork. Powers DI without manual wiring. |
Production |
| Goal | Reach for |
|---|---|
| Document the API | Swagger |
| Ship breaking changes safely | Versioning (combine with Swagger to publish per-version docs) |
| Defend against runaway clients | Rate Limiter |
Stop writing 50 lines of services.AddScoped<…> |
Refactoring |
appsettings.json{
"Swagger": { "Title": "TaskHub", "Version": "v1", "SecurityDefinition": "Bearer" },
"Versioning": { "IsEnabled": true, "AppVersion": "1.0", "InUrl": true, "ReportVersions": true },
"RateLimiter": { "IsEnabled": true, "PermitLimit": 100, "WindowInSeconds": 60 }
}
The FullHostBuilder reads each section and registers the matching tool; missing sections leave the tool off.
Action<TOptions>).FullHostBuilder wires every tool in this group automatically.