Skip to content

Add PRD for MintPlayer.AspNetCore.Endpoints library#26

Closed
PieterjanDeClippel wants to merge 1 commit intomasterfrom
feature/endpoints-library-prd
Closed

Add PRD for MintPlayer.AspNetCore.Endpoints library#26
PieterjanDeClippel wants to merge 1 commit intomasterfrom
feature/endpoints-library-prd

Conversation

@PieterjanDeClippel
Copy link
Copy Markdown
Member

Summary

  • Adds a Product Requirements Document for a new MintPlayer.AspNetCore.Endpoints library
  • Class-per-endpoint mapping with constructor injection, compile-time route enforcement via static abstract members, and source-generated endpoint discovery
  • Content-negotiated body parsing using MVC input formatters, route groups via IMemberOf<TGroup>, attribute support ([Authorize], [Tags], etc.) per endpoint and per group

Design highlights

  • 3 NuGet packages: Abstractions (interfaces + base classes), Runtime (mapping extension), Generator (source generator)
  • Partial class trick: user writes partial class X : IPostEndpoint<T>, generator adds partial class X : PostEndpoint<T>
  • Abstract base classes: BodyEndpoint<T> (POST/PUT/PATCH with MVC formatter support) and NonBodyEndpoint<T> (GET/DELETE with forced explicit binding)
  • Multi-assembly support with [assembly: EndpointsMethodName("...")] override
  • All 11 design questions resolved — ready for implementation

Test plan

  • Review PRD for completeness and correctness
  • Validate interface and base class hierarchy design
  • Confirm source generator approach (Task A: partial classes, Task B: mapping extension)
  • Approve for implementation phase

🤖 Generated with Claude Code

Design document for a new class-per-endpoint mapping library with:
- Static abstract interface members for compile-time route enforcement
- Abstract base classes (BodyEndpoint<T>, NonBodyEndpoint<T>) for shared body parsing
- Content negotiation via MVC input formatters (framework reference only)
- Source generator for endpoint discovery and partial class bridging
- Route groups via IEndpointGroup + IMemberOf<TGroup>
- Attribute support ([Authorize], [Tags], etc.) per endpoint and per group
- Scoped DI with manual disposal, multi-method, multi-assembly support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PieterjanDeClippel PieterjanDeClippel deleted the feature/endpoints-library-prd branch March 21, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant