Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use net/http.Handler directly? #486

Open
sir-farfan opened this issue Jun 21, 2024 · 0 comments
Open

Can I use net/http.Handler directly? #486

sir-farfan opened this issue Jun 21, 2024 · 0 comments

Comments

@sir-farfan
Copy link

sir-farfan commented Jun 21, 2024

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?

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

No branches or pull requests

1 participant