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

Humagin multiple API's per route group? #483

Open
outofthisworld opened this issue Jun 15, 2024 · 1 comment
Open

Humagin multiple API's per route group? #483

outofthisworld opened this issue Jun 15, 2024 · 1 comment

Comments

@outofthisworld
Copy link

I'm just wondering how this should be set up, currently from the looks of things every time I want a new group e.g gin.Group('/resource') I have to register this with humagin using NewWithGroup().

I don't mind creating multiple API's, however it isn't clear to me how exactly I make this play nicely with docs and prefix the endpoints correctly.

Creating a config and modifying the config.Server causes a loading issue, so right now I have resorted to creating one api and then in all my endpoint registrations specifying the full path

@cardinalby
Copy link

You can use groups on Huma level instead of defining them on router level.

Check out a Huma registration wrapper for that

This way you operation will have correct auto-generated IDs and Summaries and you will have a single API instance

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

2 participants