ASP.NET Minimal API OpenAPI
Builds robust ASP.NET Core Minimal APIs with strongly-typed endpoints and comprehensive OpenAPI documentation.
ASP.NET Minimal API OpenAPI guides developers in scaffolding, structuring, and documenting high-performance ASP.NET Core Minimal APIs. It enforces industry best practices, such as modular endpoint organization with MapGroup, strongly-typed responses using TypedResults and Results<T1, T2>, explicit DTO validation, and standardized error reporting through ProblemDetailsService. It also leverages .NET 9's native OpenAPI tooling, enabling automated schema generation, document transformers, and operation metadata to keep API specifications in sync with code.
Key Features
01Strongly-typed responses and compile-time safety using TypedResults and union return types
02Native .NET 9 OpenAPI integration including document and schema transformers
03Modular API architecture using MapGroup, endpoint filters, and feature-based folder organization
041 GitHub stars
05Standardized error handling using ProblemDetailsService and StatusCodePages
06Declarative request/response DTO design with explicit validation attributes and C# record types
Use Cases
01Refactoring untyped endpoint handlers to strongly-typed TypedResults and DTO contracts
02Adding comprehensive Swagger and OpenAPI specs to existing ASP.NET Minimal APIs
03Scaffolding modern, production-grade microservices and REST APIs in .NET 9