- api/common/v1 → api/open/v1,路由前缀 /api/common/v1 → /api/open/v1
- 契约层按子功能拆目录:api/open/v1/tools/{uuid,md5,random,time,ip}/index.go
- 控制器同步拆文件:internal/controller/open/{uuid,md5,random,time,ip}.go
- 命名规则(open 优于 common)与 tools 目录规则记入 AGENTS.md
- 冒烟测试:旧路由 404,新路由 5 端点全部通过
12 lines
443 B
Go
12 lines
443 B
Go
// Package open implements the public open API (/api/open/v1).
|
|
// These controllers are thin adapters over the common/tools Go packages and
|
|
// require no authentication. Each sub-feature lives in its own file here,
|
|
// mirroring api/open/v1/tools/<name>/index.go.
|
|
package open
|
|
|
|
// Controller implements the /api/open/v1 endpoints.
|
|
type Controller struct{}
|
|
|
|
// New creates an open API controller.
|
|
func New() *Controller { return &Controller{} }
|