Implement MintPlayer.AspNetCore.Endpoints library#27
Merged
PieterjanDeClippel merged 5 commits intomasterfrom Mar 15, 2026
Merged
Implement MintPlayer.AspNetCore.Endpoints library#27PieterjanDeClippel merged 5 commits intomasterfrom
PieterjanDeClippel merged 5 commits intomasterfrom
Conversation
Three-package implementation for class-per-endpoint mapping: - Abstractions: interfaces (IEndpointBase, IEndpoint, IEndpoint<T>, IEndpoint<T,R>), convenience interfaces (IGet/Post/Put/Delete/Patch), IEndpointGroup + IMemberOf<T> for route groups, attributes, descriptor - Runtime: abstract base class hierarchy (EndpointBase<T> -> BodyEndpoint<T> with MVC input formatter content negotiation + JSON fallback, NonBodyEndpoint<T> with forced explicit binding), concrete HTTP method classes, MapEndpoint<T> manual registration extension - Generator: IIncrementalGenerator that discovers endpoints, generates partial class base declarations (Task A) and MapXxxEndpoints() extension method with factory caching, disposal, attribute transfer, group support, and .Produces<TResponse>() for OpenAPI (Task B) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Tools - Rewrote generator to use IncrementalGenerator base class and Producer pattern with IndentedTextWriter/OpenBlock from MintPlayer.SourceGenerators.Tools - Fixed ObjectFactory<T> type (was incorrectly using Func<...>) - Removed Emitter.cs, replaced with EndpointGenerator.Producer.cs - Added TestApp exercising all endpoint types: - Raw GET (HealthCheck) - POST with typed request+response in group (CreateUser) - GET with explicit binding in group (GetUser) - PUT with body parsing in group (UpdateUser) - DELETE with explicit binding in group (DeleteUser) - Raw GET in group (ListUsers) - Multi-method endpoint (PreflightEndpoint) - Route group with tags (UsersApi) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix BodyEndpoint content negotiation to guard on IModelMetadataProvider - Apply [assembly: EndpointsMethodName] in test app - Pack generator + dependencies into analyzers/dotnet/cs of runtime package - Add comprehensive README.md included in NuGet package Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add GroupInfo model and second syntax provider for group-to-parent discovery - Groups can implement IMemberOf<TParentGroup> for nesting - Generator builds group tree and emits nested MapGroup calls - Add ApiGroup, ProductsApi, and ListProducts to test app - Update README with nested groups documentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IEndpointBase,IEndpoint,IEndpoint<T>,IEndpoint<T,R>, convenience interfaces (GET/POST/PUT/DELETE/PATCH × 3 variants),IEndpointGroup+IMemberOf<TGroup>, attributes,EndpointDescriptorBodyEndpoint<T>with MVC input formatter content negotiation + JSON fallback,NonBodyEndpoint<T>with forced explicit binding,MapEndpoint<T>()manual registrationIIncrementalGeneratorthat discovers endpoints, generates partial class base declarations andMapXxxEndpoints()extension with factory caching, try/finally disposal, attribute transfer, route groups, and.Produces<TResponse>()for OpenAPIKey design points
partial class X : IPostEndpoint<T>, generator addspartial class X : PostEndpoint<T>Test plan
🤖 Generated with Claude Code