Skip to content

huma.Register vs Huma.Get #400

Answered by danielgtaylor
joa23 asked this question in Q&A
Discussion options

You must be logged in to vote

@joa23 huma.Get is just a convenience wrapper around huma.Register, which allows for more customization. See here: https://github.com/danielgtaylor/huma/blob/main/huma.go#L1449-L1478

It's easy to get started with huma.Get, then move to huma.Register if you can to customize anything from the operation ID, custom documentation, adding tags, customizing schema generation, adjusting default body read timeouts, etc.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joa23
Comment options

Answer selected by joa23
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