Skip to content

Add ADR 31 about minimal API adoption#825

Merged
justindbaur merged 3 commits into
mainfrom
add-minimal-apis-adr
Jun 26, 2026
Merged

Add ADR 31 about minimal API adoption#825
justindbaur merged 3 commits into
mainfrom
add-minimal-apis-adr

Conversation

@justindbaur

@justindbaur justindbaur commented Jun 24, 2026

Copy link
Copy Markdown
Member

🎟️ Tracking

Relates to: ARCH-16

📔 Objective

Adds an ADR proposing that all new server endpoints be built using .NET minimal APIs in feature-scoped libraries, rather than continuing to add to the existing controller-based approach.

The ADR covers:

  • Why now: .NET 10 closes the last significant feature gap (automatic validation), and we've already proven a smaller slices architecture in clients and sdk
  • The required library shape: Add[Feature]Services + Map[Feature]Endpoints with a code example showing side-by-side usage with existing controllers
  • Migration strategy: existing controllers migrated opportunistically, with a more aggressive timeline for endpoint-light projects (Icons, Notifications, Events)
  • Trade-offs: mixed codebase during transition, and ActionFilterAttributes needing rewrite before affected controllers can be migrated

📸 Screenshots

@github-actions github-actions Bot added the adr label Jun 24, 2026
@justindbaur justindbaur marked this pull request as ready for review June 24, 2026 15:49
@justindbaur justindbaur requested a review from a team as a code owner June 24, 2026 15:49
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the addition of ADR 0031 proposing adoption of .NET minimal APIs for new server endpoints in feature-scoped libraries. The new ADR follows the established frontmatter and section structure (Context, Considered options, Decision outcome, Consequences, Plan), auto-registers via <DocCardList /> so no sidebar changes are needed, and the illustrative C# example is consistent with prior decisions (e.g. TryAddScoped per ADR 0026). No security, correctness, or breaking-change concerns — this is a documentation-only, Proposed-status ADR.

Code Review Details

No findings.


### Plan

A new `ENDPOINT_LIBRARY.md` file will be written in a new `src/Libraries` directory. This document

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a formal ADR for the folder changes to server?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have another ADR I want to write about breaking up Core that I think that would fit in better. I can write that first or I can just temporarily remove the src/Libraries part for now and this doc can go straight in src.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created #826

@theMickster theMickster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handful of suggestions to strengthen the prose in the document.
One noted significant concern about a mixed codebase of controllers of different types for an indefinite timeframe.

Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Comment thread docs/architecture/adr/0031-adopt-minimal-apis.md Outdated
Co-authored-by: Mick Letofsky <mletofsky@bitwarden.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploying contributing-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a104a7e
Status: ✅  Deploy successful!
Preview URL: https://f3504199.contributing-docs.pages.dev
Branch Preview URL: https://add-minimal-apis-adr.contributing-docs.pages.dev

View logs

@justindbaur justindbaur merged commit 8355121 into main Jun 26, 2026
12 checks passed
@justindbaur justindbaur deleted the add-minimal-apis-adr branch June 26, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants