DocTreen

Changelog

Notable releases and what they shipped.

For the canonical list, see CHANGELOG.md on GitHub and the npm release page.

v1.12 — Mock server

npx doctreen mock --from <url|file> spins up an Express-backed fake of any OpenAPI 3.x document. CRUD short-circuits (with envelope detection) on /resource and /resource/:id, --latency, --error-rate, --persist flags, optional @faker-js/faker for realistic values, public doctreen/example and doctreen/mock exports.

See Mock server.

v1.11 — OpenAPI polish

  • $ref-based components.schemas dedup (named + auto-anonymous)
  • First-class per-route + top-level tags with descriptions and external docs
  • OpenAPI 3.1 callbacks (per-operation) and webhooks (document-level)
  • Multi-example bodies and responses, per-status response examples
  • npx doctreen lint openapi — Spectral-lite linter with CI-ready exit codes

See OpenAPI export.

v1.10.x — Schema drift, production grade

  • Structured pipeline with per-route aggregates and hourly buckets
  • Opt-in sampling (default 1 %)
  • onDrift callback + webhook dispatch
  • Pluggable DriftStore interface; Redis-backed reference implementation
  • Drift tab in the UI with per-route badges
  • npx doctreen drift report --fail-on-mismatch for CI
  • Opt-in POST <docsPath>/drift/reset (gated by drift.allowReset + optional resetToken)
  • Rolling 7-day dailyBuckets alongside the hourly 24h buckets

See Schema drift.

v1.9 — headHtml config

Inject analytics scripts, custom CSS, favicons, or OG metadata into the docs UI <head> without forking.

v1.8 — Security + hidden routes

  • openapi.servers + securitySchemes + per-route security
  • Authorization header auto-stripped when a security requirement is in effect
  • hidden: true per-route — keeps the runtime route reachable while removing it from docs / OpenAPI

v1.7 — OpenAPI 3.1 export

Same schema bag drives Scalar, Redoc, and Swagger UI via GET /docs/openapi.json.

v1.6 — Runtime validation

Zod schemas validate incoming requests; structured 422 on mismatch.

See Runtime validation.

On this page