[feat] setup master from fork with fastapi + otel

This commit is contained in:
Azamat 2026-03-26 21:29:41 +03:00
parent 597eae9b97
commit 1fbf77f879
8 changed files with 310 additions and 1 deletions

View file

@ -0,0 +1,16 @@
# 004 Versioned HTTP API
Context
- The template needs explicit API versioning and an HTTP boundary that can be replaced later.
- FastAPI is the initial framework, but it must not become a hard dependency for core logic.
Decision
- Place HTTP transport code under `adapter/http/fastapi/`.
- Mount routers under `/api/v1` and keep version-specific routers in `routers/v1/`.
- Map HTTP requests to usecase calls through thin dependencies and handlers only.
- Keep framework-specific request and response models in the HTTP adapter layer.
Consequences
- New API versions can be introduced without changing usecase contracts.
- Replacing FastAPI means rewriting only the HTTP adapter.
- Domain and usecase layers remain free from transport concerns.