Coding StandardsWeb APIs and Services
Web APIs and Services
Structuring ASP.NET Core Minimal APIs, DI, caching, and inter-service communication.
These standards cover keeping Minimal API handlers thin, choosing between DI keying and composition, caching responses correctly, and addressing other services safely. Apply them whenever adding or restructuring an HTTP endpoint or a service-to-service integration.
- Distributed Tracing and Structured Logging with OpenTelemetry/Serilog/Seq
- Generate URL Slugs via a Composable Handle Pipeline
- Keep Minimal API Handlers Thin
- Make Behavior Safely Configurable via Interface + DI
- Output Caching for GET Endpoints
- Service Discovery for Inter-Service HTTP Calls
- Use Keyed DI Services for Compile-Time Implementation Choice