v2.34.0
Overview
Opt-in for 406 Errors
By default, Huma will fall back to the default format when content negotiation fails to find an appropriate content type that both the client and server can agree on. This enables clients which send no Content-Type header to Just Work ™️, however sometimes that behavior is not desired and you would rather return a 406 Not Acceptable. A new configuration option enables this:
config := huma.DefaultConfig("My API", "1.0.0")
config.NoFormatFallback = trueWhat's Changed
New Contributors
Full Changelog: v2.33.0...v2.34.0