danielgtaylor / danielgtaylor/huma

Can I use net/http.Handler directly?

Open
#486 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
4.4k
Forks
285
Avg merge
40m
Merged PRs (30d)
1

Description

Hey there guys

We already have close to 100 http.Handler functions for the project, we'd like to use Huma for creating the non-existing OpenAPI documentation.

So far it looks like we'd need to rewrite the signature of all our handlers, which is not a small feat because of the volume.

Is there any other way we wrap our handlers with Huma for the documentation?

I was checking the Adapter interface, it also receives a Huma-Context but I didn't see a way to just get the request and response objects in order to write a wrapper function and just call our own directly...

If possible we'd like to do a few at a time instead of attempting to document the whole thing in a humongous PR.

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.