Skip to content

Best way to integrate huma with gin router and middleware #450

Answered by danielgtaylor
tp-105 asked this question in Q&A
Discussion options

You must be logged in to vote

@tp-105 this isn't currently possible as Huma doesn't support multiple route groups on a single API instance. One workaround I've seen a few people do is wrap your middleware in another which checks the incoming path and only applies whatever middleware you need based on that path. Another option is to convert to Huma middleware and use it with huma.Register.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tp-105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants