Replies: 1 comment 1 reply
-
@danielgtaylor could you give any advice on how to achieve the proposed grouping of routes above? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thanks for this amazing framework.
However, I'm having difficulties on implementing some configurations since all the examples are based on all code within the
main.go
file, and as we know, in the real world things doesn't work like that.Could you help me with the following scenario?
I have a group of resources that will be available under the
resources/v1/
path. And other group that will be under theresources/v2/
path.Based on my interpretation of the docs, every time that I register a new operation I'll need to append those full paths to the resources like:
But I would like to avoid this hard coded thing on the paths and add this prefix somewhere else, because this kind of configuration for a lot of routes can easily be misconfigured.
How can one configure these groups like the go-chi docs show?
Also, it would be wonderful to have a real world example on how to use Huma in a real world project where all the code is broken in other files instead of everything being on the main.
Beta Was this translation helpful? Give feedback.
All reactions