Skip to content

feat(adapters): add GoFr support - #1104

Open
stareezy-1 wants to merge 1 commit into
danielgtaylor:mainfrom
stareezy-1:feat/1056-gofr-adapter
Open

feat(adapters): add GoFr support#1104
stareezy-1 wants to merge 1 commit into
danielgtaylor:mainfrom
stareezy-1:feat/1056-gofr-adapter

Conversation

@stareezy-1

Copy link
Copy Markdown

Summary

  • add a humagofr adapter that registers Huma operations through GoFr's public routing API
  • preserve Huma status codes, headers, response bodies, native GoFr context access, and ServeHTTP support
  • add focused integration/context tests, the shared adapter test case, and BYOR documentation

GoFr keeps its HTTP router and response writer private. The adapter therefore captures the raw exchange in middleware, lets Huma write the response, then suppresses GoFr's second response envelope. A mirrored http.ServeMux provides the same Huma operation handlers to humatest and autopatch through Adapter.ServeHTTP.

GoFr currently exposes registration methods for GET, PUT, POST, DELETE, and PATCH only. The dependency is pinned to v1.55.0, the newest release compatible with Huma's Go 1.25 baseline.

Verification

  • go test -race ./...
  • golangci-lint run ./...
  • GOTOOLCHAIN=go1.25.7 go test ./adapters/humagofr ./adapters

Fixes #1056

@stareezy-1

Copy link
Copy Markdown
Author

Hi @wolveix — thanks again for welcoming a GoFr adapter contribution on #1056. The implementation and focused coverage are ready here; when you have time, I’d appreciate your review, especially of the middleware bridge used to preserve Huma’s raw response semantics with GoFr. Thanks!

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.

Feature Request: Add GoFr adapter support

1 participant