From 9aba0038ef9869a63a0d2855d0cc238c2af607b4 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Tue, 8 Sep 2026 22:35:59 -0700 Subject: [PATCH 1/2] chore: add context7.json so agents get v5, not v4 Context7 is what many AI coding agents query for library documentation. Echo's entry there currently reports `versions: ["v4.15.0"]` with no v5 at all, so an agent asking Context7 for Echo gets the v4 API and writes v4 code against a v5 module. This pins the parsed branch to master (v5), records the v4 branch as a previous version so both remain queryable, and spells out the v5/v4 split in `rules` -- most importantly the signature change from `func(c echo.Context) error` to `func(c *echo.Context) error`, which is the difference that makes v4 snippets fail to compile. Claiming the entry additionally needs `url` and `public_key` from the Context7 dashboard, which has to be generated by the account that owns the project; that is not in this commit. Claude-Session: https://claude.ai/code/session_01ABWLbEypvJUVLLY26pHxtT --- context7.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 context7.json diff --git a/context7.json b/context7.json new file mode 100644 index 000000000..0a1e33594 --- /dev/null +++ b/context7.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://context7.com/schema/context7.json", + "projectTitle": "Echo", + "description": "High performance, minimalist Go web framework. This entry covers v5, the current major version.", + "branch": "master", + "previousVersions": [{ "branch": "v4" }], + "excludeFolders": ["_test", "_fixture", ".github"], + "rules": [ + "Echo's current major version is v5. Import it as `github.com/labstack/echo/v5` — the `/v5` suffix is required in go.mod and in every import path.", + "Echo v4 (`github.com/labstack/echo/v4`) is a different, incompatible API kept in long-term support until 2026-12-31. Never mix v4 and v5 code, and state which version you used.", + "In v5 the request context is a struct pointer: handlers are `func(c *echo.Context) error`. In v4 it was an interface: `func(c echo.Context) error`. v4 handlers do not compile against v5.", + "Create an instance with `echo.New()`, register routes on the returned `*echo.Echo`, and start the server with `e.Start(addr)`.", + "Middleware has the signature `func(next echo.HandlerFunc) echo.HandlerFunc` and can be applied at the Echo, Group, or individual route level.", + "Route registration methods such as `e.GET` return `echo.RouteInfo` in v5, where v4 returned `*echo.Route`.", + "Prose documentation lives at https://echo.labstack.com — every page is also available as raw Markdown by appending `.md` to its URL." + ] +} From 5340748c9e982ab16e6b8b2aa474607c2e2f9737 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Tue, 8 Sep 2026 23:47:02 -0700 Subject: [PATCH 2/2] chore: add Context7 claim key `url` and `public_key` come from the Claim Library dialog at context7.com/labstack/echo/admin. Both are claim identifiers meant to be published in the repository root, which is how Context7 verifies that whoever configured the library controls the repo. Verification reads the default branch, so the claim can only be completed once this is merged to master. Claude-Session: https://claude.ai/code/session_01ABWLbEypvJUVLLY26pHxtT --- context7.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/context7.json b/context7.json index 0a1e33594..04fd6b186 100644 --- a/context7.json +++ b/context7.json @@ -1,17 +1,27 @@ { "$schema": "https://context7.com/schema/context7.json", + "url": "https://context7.com/labstack/echo", + "public_key": "pk_76lxaEXY77ACj482CFehX", "projectTitle": "Echo", "description": "High performance, minimalist Go web framework. This entry covers v5, the current major version.", "branch": "master", - "previousVersions": [{ "branch": "v4" }], - "excludeFolders": ["_test", "_fixture", ".github"], + "previousVersions": [ + { + "branch": "v4" + } + ], + "excludeFolders": [ + "_test", + "_fixture", + ".github" + ], "rules": [ - "Echo's current major version is v5. Import it as `github.com/labstack/echo/v5` — the `/v5` suffix is required in go.mod and in every import path.", + "Echo's current major version is v5. Import it as `github.com/labstack/echo/v5` \u2014 the `/v5` suffix is required in go.mod and in every import path.", "Echo v4 (`github.com/labstack/echo/v4`) is a different, incompatible API kept in long-term support until 2026-12-31. Never mix v4 and v5 code, and state which version you used.", "In v5 the request context is a struct pointer: handlers are `func(c *echo.Context) error`. In v4 it was an interface: `func(c echo.Context) error`. v4 handlers do not compile against v5.", "Create an instance with `echo.New()`, register routes on the returned `*echo.Echo`, and start the server with `e.Start(addr)`.", "Middleware has the signature `func(next echo.HandlerFunc) echo.HandlerFunc` and can be applied at the Echo, Group, or individual route level.", "Route registration methods such as `e.GET` return `echo.RouteInfo` in v5, where v4 returned `*echo.Route`.", - "Prose documentation lives at https://echo.labstack.com — every page is also available as raw Markdown by appending `.md` to its URL." + "Prose documentation lives at https://echo.labstack.com \u2014 every page is also available as raw Markdown by appending `.md` to its URL." ] }