Documentation
¶
Overview ¶
migrate-from-chi example — chi → zip via stdlib adapter.
Use zip.AdaptNetHTTP(chiRouter) to mount an existing chi.Router as a migration step. Replace adapted routes with native zip handlers when feasible; the adapter costs ~5% perf vs native Fiber dispatch.
chi is NOT a dep of this example — we adapt any http.Handler, and a chi.Router satisfies that interface natively.
The adapted subtree is a wildcard route and registers no operation, so nothing behind /legacy/chi is in the OpenAPI document, the MCP tool list, the CLI or the call plane. That is the price of not rewriting it yet, and it is the reason to: new work goes in as a TYPED op, and a native route added later still wins by specificity, so a legacy path can be replaced one op at a time with no un-mount step.