Skip to content

feat/echov5-codegen - #6

Merged
jinuthankachan merged 5 commits into
masterfrom
wip/echov5-support
Jan 21, 2026
Merged

jinuthankachan merged 5 commits into
masterfrom
wip/echov5-support

Conversation

@jinuthankachan

Copy link
Copy Markdown
Owner
  • server code generation for echo/v5
  • does not include:
    • strict-server for echo/v5
    • middlewares for echo/v5

@jinuthankachan
jinuthankachan marked this pull request as ready for review January 21, 2026 15:41
@jinuthankachan
jinuthankachan merged commit fea1c8f into master Jan 21, 2026
@jinuthankachan
jinuthankachan deleted the wip/echov5-support branch January 21, 2026 15:51
jinuthankachan added a commit that referenced this pull request Feb 4, 2026
* feat: server code generation for echo/v5

* feat/echov5-codegen (#6)
* server code generation for echo/v5
* does not include:
    - strict-server for echo/v5
    - middlewares for echo/v5

* fix: rename PathParam to Param for echo/v5

---------

Co-authored-by: DanDagadita <[email protected]>
jinuthankachan added a commit that referenced this pull request Feb 19, 2026
* feat/echov5-codegen (#6)
* server code generation for echo/v5
* does not include:
    - strict-server for echo/v5
    - middlewares for echo/v5
jinuthankachan added a commit that referenced this pull request Feb 21, 2026
* feat/echov5-codegen (#6)
* server code generation for echo/v5
* does not include:
    - strict-server for echo/v5
    - middlewares for echo/v5
jinuthankachan added a commit that referenced this pull request Mar 4, 2026
* feat: server code generation for echo/v5

* feat/echov5-codegen (#6)
* server code generation for echo/v5
* does not include:
    - strict-server for echo/v5
    - middlewares for echo/v5

* fix: rename PathParam to Param for echo/v5

* fix: missing parts for strict server (#9)

* fix: add the missing strict server generation

* Clean up router imports

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 <[email protected]>

* Add petstore-expanded/echo-v5 example

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 <[email protected]>

* fix: skip echo-v5 example on Go < 1.25

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 <[email protected]>

---------

Co-authored-by: DanDagadita <[email protected]>
Co-authored-by: Marcin Romaszewicz <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant