-
Notifications
You must be signed in to change notification settings - Fork 0
Roadmap
This document provides a comprehensive view of feature status, planned features, and strategic direction for the Atc.Rest.Api.SourceGenerator project.
To provide a production-ready, enterprise-grade Roslyn source generator that automatically generates high-quality REST API server and client code from OpenAPI specifications, with full Native AOT support and minimal runtime overhead.
๐ Core Principles:
- โก Zero-configuration - Works out of the box with sensible defaults
- ๐ Contract-enforced results - Handlers can only return responses defined in OpenAPI
- ๐ก๏ธ Type safety - Compile-time validation of API contracts
- ๐ Minimal API - Modern ASP.NET Core patterns (not MVC Controllers)
- ๐ฆ Native AOT - Full compatibility with ahead-of-time compilation
| Feature | Status |
|---|---|
| Record type generation | โ Done |
| Nullable reference types | โ Done |
| Property validation attributes | โ Done |
| Array/collection handling | โ Done |
| Nested object support | โ Done |
| allOf composition (generic types) | โ Done |
| Type conflict resolution | โ Done |
| Enum generation | โ Done |
| oneOf/anyOf polymorphism | โ Done |
| AdditionalProperties (Dictionary) | โ Done |
| Query/Path parameter DTOs | โ Done |
| Handler interfaces per operation | โ Done |
| MapGet/MapPost/MapPut/MapDelete | โ Done |
| [AsParameters] binding | โ Done |
| Endpoint grouping (MapGroup) | โ Done |
| IEndpointDefinition pattern | โ Done |
| ValidationFilter integration | โ Done |
| GlobalErrorHandlingMiddleware | โ Done |
| API versioning support | โ Done |
| File upload (IFormFile) | โ Done |
| multipart/form-data | โ Done |
| Handler scaffolding with assembly scanning | โ Done |
| Feature | Status |
|---|---|
| x-authentication-* extensions (ATC) | โ Done |
| x-authorize-roles extension | โ Done |
| .RequireAuthorization() generation | โ Done |
| [AllowAnonymous] override | โ Done |
| SecurityPolicies constants | โ Done |
| OAuth2 scopes policy generation | โ Done |
| Bearer/JWT scheme | โ Done |
| API Key scheme | โ Done |
| OpenID Connect scheme | โ Done |
| Feature | Status |
|---|---|
| x-ratelimit-* extensions | โ Done |
| Document/Path/Operation-level policies | โ Done |
| .RequireRateLimiting() generation | โ Done |
| RateLimitPolicies constants | โ Done |
| Fixed/Sliding/TokenBucket limiters | โ Done |
| AddApiRateLimiting() DI extension | โ Done |
| Feature | Status |
|---|---|
๐ค Output Caching (x-cache-type: output) |
โ Done |
| OutputCachePolicies constants | โ Done |
| AddApiOutputCaching() DI extension | โ Done |
| .CacheOutput() endpoint integration | โ Done |
๐ HybridCache (x-cache-type: hybrid) |
โ Done |
| CachePolicies constants | โ Done |
| AddApiCaching() DI extension | โ Done |
| In-Memory/Distributed/Hybrid modes | โ Done |
| Tag-based invalidation | โ Done |
| Feature | Status |
|---|---|
| TypedClient HTTP client | โ Done |
| GET/POST/PUT/DELETE methods | โ Done |
| IAsyncEnumerable streaming | โ Done |
| File upload (Stream) | โ Done |
| PaginatedResult support | โ Done |
| EndpointPerOperation mode | โ Done |
| BinaryEndpointResponse for downloads | โ Done |
| OAuth token management | โ Done |
| Feature | Status |
|---|---|
| x-retry-* extensions | โ Done |
| ResiliencePolicies constants | โ Done |
| AddApiResilience() DI extension | โ Done |
| Exponential backoff retry | โ Done |
| Circuit breaker support | โ Done |
| Configurable CB parameters | โ Done |
| Timeout configuration | โ Done |
| Retry-After header handling | โ Done |
| Feature | Status |
|---|---|
| None / Standard / Strict strategies | โ Done |
| Core validation rules (VAL001-002) | โ Done |
| Naming rules (NAM001-006) | โ Done |
| Schema rules (SCH001-013) | โ Done |
| Operation rules (OPR001-025) | โ Done |
| Security rules (SEC001-010) | โ Done |
๐ Total: 66 validation rules implemented across 9 categories
| Version | Status |
|---|---|
| OpenAPI 3.0.x (3.0.0-3.0.4) | โ Supported |
| OpenAPI 3.1.x | |
| OpenAPI 2.0 (Swagger) | ๐ซ Blocked (VAL002 error) |
- Nullable type arrays (
type: [string, null]) -
$refwith sibling properties - Webhooks
- JSON Schema 2020-12
| Feature | Priority | Notes |
|---|---|---|
| MVC Controller generation | ๐ญ Nice-to-have | Only Minimal API supported |
| Feature | Priority | Notes |
|---|---|---|
| Recursive schemas | ๐ญ Nice-to-have | Tree structures |
not schemas |
๐ฝ Low | Negation patterns |
| Feature | Priority | Notes |
|---|---|---|
| Request/response logging | ๐ญ Nice-to-have | ILogger integration |
Allow developers to customize generated code structure:
{
"templatePath": "Templates/CustomHandler.template"
}Auto-generate repository interfaces alongside handlers:
public interface IPetRepository
{
Task<Pet?> GetByIdAsync(long id, CancellationToken ct);
Task<Pet[]> ListAsync(int? limit, CancellationToken ct);
}Generate xUnit test stubs for handlers:
public class ListPetsHandlerTests
{
[Fact]
public async Task ExecuteAsync_ReturnsOk_WhenPetsExist()
{
// Arrange, Act, Assert
}
}Extensible validation and generation:
public interface IGeneratorPlugin
{
void OnSchemaProcessed(OpenApiSchema schema, StringBuilder output);
void OnOperationProcessed(OpenApiOperation operation, StringBuilder output);
}| Category | Implemented | Percentage |
|---|---|---|
| ๐ฅ๏ธ Server features | 60/60 | 100% |
| ๐ฑ Client features | 26/26 | 100% |
| โ Validation rules | 66/66 | 100% |
| ๐๏ธ Caching features | 20/20 | 100% |
| ๐ OpenAPI 3.0 support | ~95% | ~95% |
| ๐ OpenAPI 3.1 support | ~70% | ~70% |
If migrating from atc-rest-api-generator CLI:
| Change | ๐ด Old | ๐ข New |
|---|---|---|
| Models | Classes | Records |
| Parameters | Individual args | Parameters class |
| Request body | Separate parameter | parameters.Request |
| Endpoints | MVC Controllers | Minimal API |
| Generation | CLI command | On build |
| Configuration | ApiGeneratorOptions.json | Marker files |
- โ Server Minimal API generation
- โ Client TypedClient + EndpointPerOperation modes
- โ Handler scaffolding
- โ Enum generation
- โ File upload/download support
- โ IAsyncEnumerable streaming
- โ Pagination with allOf
- โ All 66 validation rules implemented
- โ Rate Limiting
- โ Resilience & Retry
- โ Security Enhancements
- โ OAuth Token Management
- โ API Versioning
- โ Server-Side Caching (Output Caching + HybridCache)
- ๐ Full OpenAPI 3.1 support
- ๐ Documentation generation
- ๐ Performance benchmarks
- ๐ญ MVC Controller support (maybe)
- ๐ญ Custom templates
- ๐ญ Unit test generation
- ๐ญ Repository pattern
- ๐ญ Plugin system
Want to help implement a feature?
- Add array URL encoding support in TypedClient mode
- Implement OpenAPI 3.1 nullable type arrays
- Add request/response logging support
- ๐ Check existing issues on GitHub
- ๐ Create an issue describing the feature
- ๐ด Fork the repository
- ๐ป Implement following existing patterns
- ๐งช Add tests using the scenario testing framework
- ๐ Submit a PR
๐ Home
- ๐ Getting Started with Basic
- ๐ ๏ธ Getting Started with CLI
- ๐ Working with OpenAPI
- ๐ ๏ธ Working with CLI
- ๐ Working with Security
- ๐ฆ Working with Rate Limiting
- ๐ Working with Resilience
- ๐๏ธ Working with Caching
- ๐ข Working with Versioning
- โ Working with Validations
- ๐ Analyzer Rules
- ๐บ๏ธ Roadmap
- ๐ช Showcase Demo
- ๐ง Development Notes
- ๐ฆ GitHub Repository
- ๐ฅ NuGet Package
- ๐ Report Issues