⚠️ Preview release. Published for early testing — not marked "Latest". The mock
format, its YAML/JSON serialization, and the HTTP/CLI API are unchanged from1.0.0
(locked by golden serialization tests and the venom integration suite); the API additions
below are backward-compatible.
✨ New features
- Load mocks at startup with
--init-mocks/SMOCKER_INIT_MOCKS: a YAML file of mocks
(thePOST /mocksformat) is seeded into a session on boot. Read-only and mutually exclusive
with--persistence-directory— ideal for declarative Docker/Kubernetes setups (mount a
ConfigMap). (#331, closes #217 / #222) POST /mocksnow returns the target session (id+name), so scripts can chain
GET /mocks?session=<id>without a separate lookup. (#335)- New exported
BodyMatcherconstructors for building matchers from the Go client.
(#315, thanks @suzuito)
🐛 Fixes
delayis now applied forgo_template_jsondynamic responses — a delay written as a
duration string ("10ms") was silently dropped. (#305)- Header names are matched case-insensitively (RFC 7230), so a mock declaring
content-type
matches a request'sContent-Type. Header values and query-parameter names stay
case-sensitive. (#281) - No more duplicate "Session #1" — the default session is now created atomically, fixing a
race under concurrent requests (e.g. right after "Reset Sessions"). (#332)
🔧 Tooling
Full changelog: v1.1.1-preview...v1.1.2-preview