API Library Template — Architecture (agents)¶
Agent intent¶
This template produces reusable client assemblies consumed by microservices. Do not embed host concerns (WebApplication, Kestrel lifecycles) unless the repo explicitly adds samples.
Canonical: Architecture — public
Typical layout (conceptual)¶
flowchart TB
Host[Consuming microservice host]
Lib[ApiLibrary.*]
Ext[External HTTP API]
Host --> Lib
Lib --> Ext
Hold "Alt" / "Option" to enable pan & zoom
- Library exposes typed clients + options binding.
- Host registers
HttpClient+ resilience + OpenTelemetry (if used).
Testing boundary¶
- Unit: pure option parsing, request builders.
- Integration: WireMock asserting URLs, headers, retries — see Testing.