github smocker-dev/smocker v1.1.2-preview

pre-releaseone day ago

⚠️ Preview release. Published for early testing — not marked "Latest". The mock
format, its YAML/JSON serialization, and the HTTP/CLI API are unchanged from 1.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
    (the POST /mocks format) 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 /mocks now returns the target session (id + name), so scripts can chain
    GET /mocks?session=<id> without a separate lookup. (#335)
  • New exported BodyMatcher constructors for building matchers from the Go client.
    (#315, thanks @suzuito)

🐛 Fixes

  • delay is now applied for go_template_json dynamic 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's Content-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

  • Dependency bumps (golang.org/x/sync, @testing-library/react). (#326, #327)

Full changelog: v1.1.1-preview...v1.1.2-preview

Don't miss a new smocker release

NewReleases is sending notifications on new releases.