Documentation
¶
Overview ¶
migrate-from-beego example — beego → zip migration via http.Handler adapter. beego.BeeApp exposes Handlers as an http.Handler-compatible surface; the same AdaptNetHTTP adapter that fronted chi handles beego too.
In a real port:
import (
"github.com/beego/beego/v2/server/web"
"github.com/zap-proto/zip"
)
beeApp := web.NewHttpSever() // your existing beego app
zipApp := zip.New(zip.Config{AppName: "iam"})
zipApp.Group("/legacy/iam").All("/*", zip.AdaptNetHTTP(beeApp.Handlers))
This example uses a stand-in http.Handler so the file builds without pulling beego — same adapter pattern in either case.
The adapted subtree is a wildcard route and registers no operation, so nothing behind /legacy/iam is in the OpenAPI document, the MCP tool list, the CLI or the call plane. New work goes in as a TYPED op, and a native route added later wins by specificity — so the legacy tree shrinks one op at a time.
Click to show internal directories.
Click to hide internal directories.