Skip to content

API Library Template — Agent handbook

Library onlyHttpClientFactory, Polly, one AuthenticationType per scaffold, WireMock tests. The hosting app owns OpenTelemetry exporters unless product says otherwise.

Canonical public spec: API Library — ConnectSoft.Documentation

Agent checklist

Rule Why
WireMock for HTTP integration Avoid HttpClient Moq for real wire behavior
Single auth layout per library Scaffold contract — multiple schemes need design review
Multi-target net8;net9;net10 Match template tfm matrix when extending

When not to use

Blueprint sketch

library: StripePaymentsClient
authentication: ApiKey | OAuth2 | ...
use_metrics: true | false
resilience: Standard | Hedging
chaos_tests: dev_only

Topic index

Topic Use
Parameters Symbol → feature mapping
Testing WireMock patterns
Resiliency & Chaos Polly + test faults