IeuanWalker/MinimalApi.Endpoints
53.0
Adequate · 21 September 2026
11.1k
lines of production code
C#
primary language
4
measurements over time
What this system is
This system is a .NET source generator and library designed to simplify the creation of Minimal APIs by enabling a class-based, zero-reflection approach to endpoint definition. It provides infrastructure for structured route grouping, automatic request binding, and integrated validation using FluentValidation and DataAnnotations. The tool also enhances API documentation by automatically generating accurate OpenAPI 3.1 schemas, including detailed authorization policies and schema normalization.
How it got here
2025 — Initial release and example expansion
27 changes.
This period established the MinimalApi.Endpoints project with its core source generator, interfaces, and extension methods, while upgrading the codebase to .NET 10. The example API was significantly expanded to demonstrate features like versioning, file handling, and caching, supported by comprehensive integration and unit test coverage.
2026 — Validation and OpenAPI testing expansion
5 changes.
This period focused on expanding the library's validation capabilities and OpenAPI document transformers, including new operations for manipulating validation rules. Comprehensive integration and unit tests were added to verify these features, covering FluentValidation, DataAnnotations, and various schema transformation logic.
Features
Add endpoint to export todos as an HTML file
A new GET /export endpoint has been added to the Todos API, allowing users to download all their todos as a formatted HTML file. The endpoint returns the HTML content with a 'todos.html' filename; if no todos exist, it returns a 204 No Content response. The exported HTML includes columns for ID, Title, Description, Is Completed, Created At, and Updated At, with proper HTML encoding for user-provided text.
example/ExampleApi/Endpoints/Todos/GetExport · high confidence
Added file handling example endpoints
The example API now includes three new endpoints for demonstrating file upload scenarios: a single file upload at \/FileHandling/SingleFile\, a list of files upload at \/FileHandling/ListOfFiles\, and a multipart form upload at \/FileHandling/Multipart\. These endpoints illustrate how to bind \IFormFile\, \IFormFileCollection\, and mixed data types using the Minimal API framework, including specific handling for property-name-based file binding in multipart requests.
example/ExampleApi/Endpoints/FileHandling · high confidence
Added validation rule manipulation operations
The library now includes a base class and specific operations (Alter, Remove, RemoveAll) for modifying validation rules within the OpenAPI document transformers. This allows users to programmatically change error messages, remove specific rules by their message, or clear all validation rules from a list.
IeuanWalker.MinimalApi.Endpoints · high confidence
New endpoint and validation interface contracts
The library introduces a new set of interfaces and base classes to structure minimal API endpoints and validation logic. Developers can now implement \IEndpoint\, \IEndpointWithoutRequest\, \IEndpointWithoutResponse\, or \IEndpoint\<TRequest, TResponse\>\ to define request handling and route configuration, or group endpoints using \IEndpointGroup\. Additionally, a generic \Validator\<TRequest\>\ base class is provided to simplify DTO validation using FluentValidation, with a note that validator instances are registered as singletons for performance.
src/IeuanWalker.MinimalApi.Endpoints/Interfaces · high confidence
New example endpoints for enum, type, and validation scenarios
The example API now includes new endpoint groups under \Enum\, \TypeExamples\, and \Validation\ to demonstrate specific framework capabilities. The \Enum\ group shows how to handle \PriorityEnum\ values via query and body parameters using FluentValidation. The \TypeExamples\ group exposes endpoints for \FromQuery\, \FromBody\, and \FromForm\ requests that accept a wide range of primitive types (including \DateOnly\, \TimeOnly\, \Guid\, and various arrays/lists) to demonstrate the \TypeDocumentTransformer\. The \Validation\ group provides concrete examples of using both DataAnnotations (e.g., \StringLength\, \Range\, \EmailAddress\) and FluentValidation (e.g., \MinimumLength\, \Matches\) on request models, including custom validation attributes and nested object validation.
example/ExampleApi/Endpoints/Validation · high confidence
New extension methods for endpoint configuration, validation, and caching
This release introduces a suite of new extension methods in the \IeuanWalker.MinimalApi.Endpoints\ library to streamline endpoint definition and documentation. Developers can now use \RequireRoles\ for simplified role-based authorization and \AllowCachingAuthenticatedResponses\ to enable output caching for authenticated users. The library also adds \IsInEnum\ for FluentValidation to validate integer-based enum values, and \RequestFromBody\ to explicitly mark request bindings in OpenAPI documentation. Additionally, \OpenApiExtensions\ now provides \EnhancePropertiesAndValidation\ to automatically document FluentValidation and DataAnnotations rules, and \AddAuthenticationSchemes\ to document security requirements, alongside \WithNullableResponse\ for accurate nullable schema generation.
src/IeuanWalker.MinimalApi.Endpoints/Extensions · high confidence
Project initialization with source generator, documentation, and test infrastructure
This release establishes the project structure for MinimalApi.Endpoints, a source generator for .NET Minimal APIs. It introduces a comprehensive .editorconfig to standardize C\# formatting and code style, an MIT license, and detailed README documentation explaining the zero-reflection, class-based endpoint approach. The diff also adds a global.json pinning the SDK to version 10.0.100, test coverage settings via coverlet.runsettings, and a solution file that organizes the source generator projects alongside new integration and unit test projects.
(repo-wide) · high confidence
Removals
Removal of unused request model classes from Test V1 and V2 endpoints
The \RequestModel\ classes for both the Test V1 and Test V2 API endpoints have been removed. These classes, which previously defined a simple integer property named \Test\, are no longer part of the codebase, indicating that the endpoints no longer rely on these specific request structures.
example/ExampleApi/Endpoints/TestV1, example/ExampleApi/Endpoints/TestV2 · high confidence
Behavioural changes
Authenticated responses are now cacheable and validation helpers are added
Authenticated API responses are now stored in the output cache, allowing subsequent requests from authenticated users to be served from cache instead of hitting the endpoint logic again. This is achieved via a new AllowAuthenticatedCachePolicy that overrides the default behavior which typically blocks caching for authenticated requests. Additionally, a new ValidationErrors\<T\> helper class has been introduced to simplify collecting and formatting validation errors into standard HTTP problem details responses.
src/IeuanWalker.MinimalApi.Endpoints · high confidence
Enhanced OpenAPI document generation with authorization details and schema normalization
The OpenAPI document generation now includes detailed authorization policy requirements in operation descriptions, enriching the documentation with specific policy names and their associated requirements. Additionally, the schema generation has been improved with better nullability handling, ensuring that nullable types are correctly represented in the OpenAPI output. Enum schemas are now enriched with value information and member names, providing clearer documentation for enum properties. The system also normalizes nullable schemas and reorders them to ensure consistent representation across different OpenAPI versions.
src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers · high confidence
Get Todo by ID endpoint returns 204 No Content for missing items
The GetById endpoint for the Todo resource now returns an HTTP 204 No Content status when the requested todo is not found, instead of returning a null response body. This change aligns the endpoint with standard RESTful practices for resource retrieval and utilizes the new \Results\<Ok\<ResponseModel\>, NoContent\>\ return type, while also adopting the \RequestAsParameters\ binding style and grouping under \TodoEndpointGroup\.
example/ExampleApi/Endpoints/Todos/GetById · high confidence
Introduces Todo endpoint group configuration
The application now uses a dedicated TodoEndpointGroup class to define the route prefix for Todo resources. This change implements the IEndpointGroup interface, allowing the API to organize Todo endpoints under the versioned path 'api/v{version:apiVersion}/todos' via the MapGroup method.
example/ExampleApi/Endpoints/Todos · high confidence
Migrate OpenAPI generation to 3.1 and simplify Scalar configuration
The API infrastructure now generates OpenAPI 3.1 documents instead of 3.0, enabling enhanced schema reference IDs and property validation enhancements via the new \AddOpenApi\ configuration in \VersioningConfiguration\. Concurrently, \ScalarConfiguration\ has been simplified to automatically discover and map API versions at runtime using \WithDocumentPerVersion\, removing the need for manual version list definitions and default client layout settings.
example/ExampleApi/Infrastructure · high confidence
Refactored Todo endpoints to use request grouping and body binding
The Todo API endpoints (Delete, Patch, Put) have been refactored to use the \TodoEndpointGroup\ for route configuration, simplifying the path definitions to just the ID parameter. Additionally, the Patch and Put endpoints now bind the update payload from the request body via a dedicated \RequestBodyModel\ class instead of flattening fields into the root request model. The Put endpoint also now explicitly returns a 409 Conflict status when the target todo is not found, rather than returning null.
example/ExampleApi/Endpoints/Todos/Delete, example/ExampleApi/Endpoints/Todos/Patch, example/ExampleApi/Endpoints/Todos/Put · high confidence
Refactored endpoint generation helpers with validation and binding support
The generator's helper logic in the Helpers directory has been restructured to support more robust endpoint configuration. Endpoint generation now includes built-in validation for FluentValidation filters, allowing automatic injection of validation filters when a validator is detected. The generator also supports explicit request binding types (FromBody, FromQuery, FromRoute, FromHeader, FromForm, AsParameters) via new configuration methods. Additionally, MapGroup support has been added, enabling endpoint groups to define shared route patterns and validation settings. Diagnostics have been improved to catch configuration errors such as missing or multiple HTTP verbs, MapGroup calls, and request binding methods.
src/IeuanWalker.MinimalApi.Endpoints.Generator/Helpers · high confidence
Refactored example API structure and added standard middleware
The example API has been reorganized to improve code clarity and add robust error handling. The \Todo\ model and \InMemoryTodoStore\ have been moved from \Models\ and \Services\ namespaces to \Data\, reflecting their role as data access components. In \Program.cs\, the application now explicitly registers \ProblemDetails\ for standardized error responses, enables validation support, and adds an \HttpContextAccessor\. Additionally, the generic endpoint registration methods have been simplified to \AddEndpoints\ and \MapEndpoints\, and a global exception handler middleware (\UseExceptionHandler\) has been added to the request pipeline.
example/ExampleApi · high confidence
Refactors GetAllTodosEndpoint to use MapGroup and standardizes naming
The GetAllTodosEndpoint now uses the \Group\<TodoEndpointGroup\>()\ helper instead of manually configuring the route path, aligning with the project's MapGroup support. The handler method has been renamed from \HandleAsync\ to \Handle\, and the code formatting has been standardized to use tabs. Additionally, the \Configure\ method is now marked with \\[ExcludeFromCodeCoverage\]\.
example/ExampleApi/Endpoints/Todos/GetAll · high confidence
Source generator now includes validation and map-group diagnostics with cache-friendly architecture
The source generator now reports analyzer warnings and errors for common configuration issues, such as missing or duplicate HTTP verbs, missing or multiple MapGroup calls, unused endpoint groups, and conflicting validator/disabled-validation settings. To support these diagnostics efficiently, the generator uses a new CachableLocation wrapper to store diagnostic locations without holding references to syntax trees, improving incremental build performance. The internal data model has been refactored to support these new checks, including dedicated info classes for validators, abstract validators, and endpoint groups.
src/IeuanWalker.MinimalApi.Endpoints.Generator · high confidence
Todo creation endpoint refactored to use FluentValidation and simplified request binding
The POST /api/v{version}/todos endpoint now uses FluentValidation instead of DataAnnotations for input validation, with rules enforced via a dedicated RequestModelValidator class. The request body is explicitly bound using .RequestFromBody(), and the endpoint configuration is grouped via .Group\<TodoEndpointGroup\>(). The IsCompleted field has been removed from the RequestModel, meaning clients can no longer set the completion status during creation; it is now implicitly handled by the backend. Additionally, the endpoint method was renamed from HandleAsync to Handle, and code coverage exclusions were added to the Configure method.
example/ExampleApi/Endpoints/Todos/Post · high confidence
Weather Forecast API endpoints refactored and expanded with V2 support
The example API endpoints have been restructured from generic test implementations to a dedicated Weather Forecast feature, organized under the \ExampleApi.Endpoints.WeatherForecast\ namespace. The V1 endpoint now uses a GET method without request validation, while a new V2 endpoint has been introduced at \api/v{version:apiVersion}/weatherforecast\ that includes explicit API versioning, route naming, and tagging for better discoverability. Additionally, the V2 response model now includes a \TemperatureF\ field, providing temperature in Fahrenheit alongside the existing Celsius data.
example/ExampleApi/Endpoints/WeatherForecast · high confidence
Test coverage
Added integration tests for API infrastructure and OpenAPI schema validation; Added integration tests for API validation endpoints; Added integration tests for file handling endpoints; Added snapshot and unit tests for source generator diagnostics and caching; Added tests for ValidationErrors helper and HttpValidationProblemDetails conversion; Added unit tests for OpenAPI document transformers and schema helpers; Added unit tests for Todo, File Handling, and Weather Forecast endpoints; Added unit tests for endpoint generator helper methods; Added unit tests for extension methods and validation filters; Added unit tests for source generator and string extension utilities; Integration test coverage for Todos and WeatherForecast endpoints.
Dependencies
Upgrade to .NET 10 and update dependencies
The project has been upgraded to target .NET 10.0, requiring a compatible runtime. Several key dependencies have been updated to their latest versions, including Microsoft.CodeAnalysis.CSharp (4.7.0 to 5.6.0/5.9.0), Microsoft.AspNetCore.OpenApi (9.0.9 to 10.0.11), and the Asp.Versioning suite (8.1.0 to 10.2.x). The example API also incorporates the new Asp.Versioning.OpenApi package and updates Scalar.AspNetCore to 2.16.20.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 53 (+2.0)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 77 → 65 (-11.7)
- Architecture 62 → 62 (+0.0)
- Maturity 62 → 60 (-1.9)
- Readiness 42 → 44 (+1.8)
- Security 54 → 63 (+9.0)
- Performance 61 → 61 (-0.2)
Resolved (52)
- BarePragmaDisable (example/ExampleApi/Endpoints/Todos/Put/RequestModel.cs)
- BarePragmaDisable (example/ExampleApi/Endpoints/Validation/GetDataAnnotationsFromQuery/RequestModel.cs)
- BarePragmaDisable (example/ExampleApi/Endpoints/Validation/PostDataAnnotationsFromBody/RequestModel.cs)
- BarePragmaDisable (example/ExampleApi/Endpoints/Validation/PostDataAnnotationsFromBody/RequestModel.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/Core/SchemaTypeResolver.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/Core/SchemaTypeResolver.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- BarePragmaDisable (tests/IeuanWalker.MinimalApi.Endpoints.Generator.Tests/TestHelper.cs)
- BarePragmaDisable repeated across 11 files (src/IeuanWalker.MinimalApi.Endpoints/Extensions/ETagExtensions.cs)
- Bounded contexts not declared
- CRAP 110: SecuritySchemeTransformer.TransformAsync (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/SecuritySchemeTransformer.cs)
- CRAP 112: ValidationDocumentTransformer.CreateInlineSchemaWithAllValidation (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.SchemaCreation.cs)
- CRAP 132: AuthorizationPoliciesAndRequirementsOperationTransformer.TransformAsync (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/AuthorizationPoliciesAndRequirementsOperationTransformer.cs)
- CRAP 32: ValidationDocumentTransformer.GetValidatorErrorMessage (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- CRAP 38: ValidationDocumentTransformer.GetEnumTypeFromValidatorFields (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- CRAP 44: ValidationDocumentTransformer.ExtractEnumAndPropertyTypes (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- …and 32 more
New (124)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- BarePragmaDisable (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/ValidationDocumentTransformer.FluentValidation.cs)
- ClassTooLong: TypeDocumentTransformer (src/IeuanWalker.MinimalApi.Endpoints/OpenApiDocumentTransformers/PropertyEnhancer/TypeDocumentTransformer.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Enum/EnumEndpointGroup.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Enum/GetFromQuery/GetFromQueryEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Enum/GetFromQuery/RequestModel.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Enum/GetFromQuery/RequestModel.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Enum/PostFromBody/PostFromBodyEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/Delete/DeleteTodoEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/GetAll/GetAllTodosEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/GetById/GetTodoByIdEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/GetExport/GetExportEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/Patch/PatchTodoEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/Post/PostTodoEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/Put/PutTodoEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/Todos/TodoEndpointGroup.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/TypeExamples/GetFromQuery/GetTypeExamplesFromQueryEndpoint.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/TypeExamples/GetFromQuery/RequestModel.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/TypeExamples/GetFromQuery/ResponseModel.cs)
- CoverageExclusion (example/ExampleApi/Endpoints/TypeExamples/PostFromBody/PostTypeExamplesFromBodyEndpoint.cs)
- …and 104 more
Changes since last survey
- 2 commits — 2 feature/other, 0 fixes
By area
- src/IeuanWalker.MinimalApi.Endpoints — 2 commits
Notable commits
- change: Improve OpenAPI nullability, schema traversal, and versioning (#87)
- change: Update dependencies and migrate OpenAPI generation to 3.1 (#88)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
IeuanWalker/MinimalApi.Endpoints was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 54f624294718ae6ca67a927862270360ffc582fc — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.