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

v2.31.0

Choose a tag to compare

@danielgtaylor danielgtaylor released this 10 Mar 17:22
· 95 commits to main since this release
6f2a42b

Overview

Go 1.24 omitzero Support!

Huma now supports Go's new JSON omitzero feature out of the box, treating it similar to the existing omitempty in terms of making fields optional. The updated rules for optional fields now look like this:

  1. Start with all fields required.
  2. If a field has omitempty, it is optional.
  3. If a field has omitzero, it is optional.
  4. If a field has required:"false", it is optional.
  5. If a field has required:"true", it is required.

See https://huma.rocks/features/request-validation/#optional-required for more info.

What's Changed

New Contributors

Full Changelog: v2.30.0...v2.31.0