Skip to content

fix: missing parts for strict server - #9

Merged
jinuthankachan merged 3 commits into
feat/echov5-supportfrom
fix/missing-parts
Mar 3, 2026
Merged

jinuthankachan merged 3 commits into
feat/echov5-supportfrom
fix/missing-parts

Conversation

@jinuthankachan

Copy link
Copy Markdown
Owner

No description provided.

jinuthankachan and others added 3 commits January 21, 2026 21:13
* feat/echov5-codegen (#6)
* server code generation for echo/v5
* does not include:
    - strict-server for echo/v5
    - middlewares for echo/v5
@jinuthankachan
jinuthankachan merged commit 23e1bba into feat/echov5-support Mar 3, 2026
@jinuthankachan
jinuthankachan deleted the fix/missing-parts branch March 3, 2026 18:38
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