这是indexloc提供的服务,不要输入任何密码
Skip to content

v2.34.0

Choose a tag to compare

@danielgtaylor danielgtaylor released this 30 Jun 16:21
· 11 commits to main since this release
eafeecd

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 = true

What's Changed

  • feat: #843 Allow 406 Not Acceptable with NoFormatFallback config by @jh125486 in #850

New Contributors

Full Changelog: v2.33.0...v2.34.0