Merged
Conversation
Contributor
|
Thank you for the PR, just two minor issues:
|
f01cb1f to
9164034
Compare
* feat/echov5-codegen (#6) * server code generation for echo/v5 * does not include: - strict-server for echo/v5 - middlewares for echo/v5
9164034 to
a598380
Compare
|
Hey guys, |
Member
This PR isn't ready to go, we can't merge a half complete feature. I've checked it out and I'm amending it. |
* fix: add the missing strict server generation
Instead of hardcoding each router's framework and strict middleware imports directly in imports.tmpl with per-router conditional blocks, compute them in Go code via GenerateOptions.RouterImports() and pass them to the template as RouterImports. The template now uses a single range loop over .RouterImports, making it straightforward to add new routers without touching the template. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Echo v5 version of the petstore-expanded example, in its own Go module (go 1.25.0) to avoid bumping the Go version of the shared examples module. Key differences from the echo (v4) example: - *echo.Context (pointer) instead of echo.Context (interface) - echo.NewHTTPError(code, message) takes exactly two args - No HTTPError.Internal field - EchoRouter returns echo.RouteInfo instead of *echo.Route - log.Fatal(e.Start(...)) instead of e.Logger.Fatal(...) Includes an inline OpenAPI request validation middleware (middleware/) adapted from echo-middleware for echo v5, since no published echo-v5 middleware package exists yet. Models and server stubs are placeholders until the codegen circular dependency for go:generate in isolated modules is resolved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mromaszewicz
approved these changes
Mar 3, 2026
The echo-v5 example requires Go 1.25+ (for echo/v5). When CI runs with GOTOOLCHAIN=local on Go 1.24, the module refuses to build. Add a Go version guard to the Makefile so all targets skip gracefully with an informational message on older Go versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.